MCPcopy Index your code
hub / github.com/evanw/node-source-map-support / compareLines

Function compareLines

test.js:11–21  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

9var bufferFrom = require('buffer-from');
10
11function 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
23function createEmptySourceMap() {
24 return new SourceMapGenerator({

Callers 3

compareStackTraceFunction · 0.85
compareStdoutFunction · 0.85
test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected