Skip to content

Instantly share code, notes, and snippets.

@daleharvey
Created February 24, 2014 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daleharvey/9198928 to your computer and use it in GitHub Desktop.
Save daleharvey/9198928 to your computer and use it in GitHub Desktop.
describe('dummy-test', function () {
beforeEach(function (done) {
var err = {
status: 404,
name: 'not_found',
message: 'missing',
error: true
};
done(err);
});
it('is a test', function (done) {
setTimeout(done, 20);
});
});
dummy-test
1) "before each" hook
0 passing (6ms)
1 failing
1) dummy-test "before each" hook:
Error: done() invoked with non-Error: [object Object]
at /Users/daleharvey/src/pouchdb/node_modules/mocha/lib/runnable.js:206:38
at Context.<anonymous> (/Users/daleharvey/src/pouchdb/tests/test.replication.js:14:5)
at Hook.Runnable.run (/Users/daleharvey/src/pouchdb/node_modules/mocha/lib/runnable.js:204:15)
at next (/Users/daleharvey/src/pouchdb/node_modules/mocha/lib/runner.js:259:10)
at Object._onImmediate (/Users/daleharvey/src/pouchdb/node_modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment