Skip to content

Commit 00b478f

Browse files
committed
tweak test assertion logging
1 parent 45c7e08 commit 00b478f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ var SourceMapGenerator = require('source-map').SourceMapGenerator;
66
var child_process = require('child_process');
77
var assert = require('assert');
88
var fs = require('fs');
9+
var util = require('util');
910
var bufferFrom = Buffer.from;
1011

1112
function compareLines(actual, expected) {
12-
assert(actual.length >= expected.length, 'got ' + actual.length + ' lines but expected at least ' + expected.length + ' lines');
13+
assert(actual.length >= expected.length, 'got ' + actual.length + ' lines but expected at least ' + expected.length + ' lines\n' + util.inspect({actual, expected}));
1314
for (var i = 0; i < expected.length; i++) {
1415
// Some tests are regular expressions because the output format changed slightly between node v0.9.2 and v0.9.3
1516
if (expected[i] instanceof RegExp) {

0 commit comments

Comments
 (0)