switched out assertion library with should.js... I really should have written my own baby util library since that was the third time I've done that...

This commit is contained in:
Spencer Alger
2013-12-23 15:33:53 -07:00
parent 3d0b2fde4e
commit 2b3734a081
32 changed files with 828 additions and 987 deletions

View File

@ -1,4 +1,5 @@
var errors = require('../../src/lib/errors');
var expect = require('expect.js');
var _ = require('lodash');
_.each(errors, function (CustomError, name) {
@ -6,8 +7,9 @@ _.each(errors, function (CustomError, name) {
describe(name, function () {
it('extend the ErrorAbstract and Error classes', function () {
var err = new CustomError();
err.message.length.should.be.above(7);
err.should.be.an.instanceOf(Error).and.an.instanceOf(errors._Abstract);
expect(err.message.length).to.be.greaterThan(7);
expect(err).to.be.an(Error);
expect(err).to.be.an(errors._Abstract);
});
});
}
@ -20,6 +22,6 @@ describe('Error Abstract', function () {
var err = new errors._Abstract();
process.browser = isBrowser;
err.stack.should.be.exactly('');
expect(err.stack).to.be('');
});
});