Skip to content

Instantly share code, notes, and snippets.

@mantoni
Created March 21, 2015 20:28
Show Gist options
  • Save mantoni/e2927ced1484f01b1fb8 to your computer and use it in GitHub Desktop.
Save mantoni/e2927ced1484f01b1fb8 to your computer and use it in GitHub Desktop.
Mocha diff not working with assert
/*global describe, it*/
'use strict';
var assert = require('assert');
describe('diff', function () {
it('works', function () {
assert.equal('foo', 'bar');
});
});
diff
1) works
0 passing (9ms)
1 failing
1) diff works:
AssertionError: "foo" == "bar"
at Context.<anonymous> (/Users/max/projects/mocha-diff-bug/index.js:9:12)
at callFn (/Users/max/projects/mocha-diff-bug/node_modules/mocha/lib/runnable.js:266:21)
...
{
"name": "mocha-diff-bug",
"version": "1.0.0",
"scripts": {
"test": "mocha index.js"
},
"devDependencies": {
"mocha": "^2.2.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment