(n: number)
| 184 | legend.renderTo(div); |
| 185 | |
| 186 | function verifyMaxEntriesInRow (n: number) { |
| 187 | legend.maxEntriesPerRow(n); |
| 188 | const rows = legend.content().selectAll<Element, any>(ROW_SELECTOR); |
| 189 | assert.strictEqual(rows.size(), (6 / n), "number of rows is correct"); |
| 190 | rows.each(function(d: any) { |
| 191 | const entries = d3.select(this).selectAll<Element, any>(ENTRY_SELECTOR); |
| 192 | assert.strictEqual(entries.size(), n, "number of entries in row is correct"); |
| 193 | }); |
| 194 | } |
| 195 | |
| 196 | verifyMaxEntriesInRow(1); |
| 197 | verifyMaxEntriesInRow(2); |
no test coverage detected