* Provides a shorthand for validating a table of cells. * To pass, both arrays must have the same dimensions, and each cell in `actualRows` must * satisfy the shorthand assertion of the corresponding location in `expectedRows`. * * Available Expectations Can Be: * * * A `String`
(actualTable, expectedTable)
| 361 | */ |
| 362 | |
| 363 | function checkLayout(actualTable, expectedTable) { |
| 364 | expectedTable.forEach(function (expectedRow, y) { |
| 365 | expectedRow.forEach(function (expectedCell, x) { |
| 366 | if (expectedCell !== null) { |
| 367 | let actualCell = findCell(actualTable, x, y); |
| 368 | checkExpectation(actualCell, expectedCell, x, y, actualTable); |
| 369 | } |
| 370 | }); |
| 371 | }); |
| 372 | } |
| 373 | |
| 374 | function findCell(table, x, y) { |
| 375 | for (let i = 0; i < table.length; i++) { |
no test coverage detected
searching dependent graphs…