(name, expected, expectedFrom, got, gotFrom)
| 122 | let issueCount = 0 |
| 123 | |
| 124 | function maybeCheckExpectation (name, expected, expectedFrom, got, gotFrom) { |
| 125 | if (knownProblems.has(name)) { |
| 126 | try { |
| 127 | checkExpectation(expected, got) |
| 128 | } catch (err) { |
| 129 | issueCount++ |
| 130 | if (debug) { |
| 131 | console.log( |
| 132 | `PLEASE RESOLVE: '${gotFrom}' was supposed to '${expectedFrom}'`) |
| 133 | console.log(' but', err.toString()) |
| 134 | } |
| 135 | } |
| 136 | } else { |
| 137 | try { |
| 138 | checkExpectation(expected, got) |
| 139 | } catch (err) { |
| 140 | console.error(`DOC ERROR: '${gotFrom}' was supposed to '${expectedFrom}'`) |
| 141 | throw err |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | function checkExpectation (want, got) { |
| 147 | if (Array.isArray(want)) { |
no test coverage detected
searching dependent graphs…