Browse Source

add common.diff() function for test debugging

pull/438/head
missinglink 9 years ago
parent
commit
cd16ff92b1
  1. 1
      package.json
  2. 10
      test/unit/run.js

1
package.json

@ -61,6 +61,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