Browse Source

Merge pull request #438 from pelias/test_utils

add common.diff() function for test debugging
pull/423/head
Peter Johnson a.k.a. insertcoffee 9 years ago
parent
commit
e4caca0b28
  1. 1
      package.json
  2. 10
      test/unit/run.js

1
package.json

@ -60,6 +60,7 @@
},
"devDependencies": {
"ciao": "^0.6.0",
"difflet": "^1.0.1",
"istanbul": "^0.4.2",
"jshint": "^2.5.6",
"nsp": "^2.2.0",

10
test/unit/run.js

@ -1,6 +1,12 @@
var tape = require('tape'),
diff = require('difflet')({ indent : 2, comment : true });
var tape = require('tape');
var common = {};
var common = {
// a visual deep diff rendered using console.error()
diff: function( actual, expected ){
console.error( diff.compare( actual, expected ) );
}
};
var tests = [
require('./controller/index'),

Loading…
Cancel
Save