(actual, expected)
| 9 | var bufferFrom = require('buffer-from'); |
| 10 | |
| 11 | function compareLines(actual, expected) { |
| 12 | assert(actual.length >= expected.length, 'got ' + actual.length + ' lines but expected at least ' + expected.length + ' lines'); |
| 13 | for (var i = 0; i < expected.length; i++) { |
| 14 | // Some tests are regular expressions because the output format changed slightly between node v0.9.2 and v0.9.3 |
| 15 | if (expected[i] instanceof RegExp) { |
| 16 | assert(expected[i].test(actual[i]), JSON.stringify(actual[i]) + ' does not match ' + expected[i]); |
| 17 | } else { |
| 18 | assert.equal(actual[i], expected[i]); |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | function createEmptySourceMap() { |
| 24 | return new SourceMapGenerator({ |
no outgoing calls
no test coverage detected