【发布时间】:2017-04-11 23:42:04
【问题描述】:
即使抛出错误,此代码也会失败。
it('should throw error when foo config value is falsey', (done) => {
const config = { foo: null, bar: 'some-name' };
expect(quux.withConfig(config).load('*', (err, inst) => { done(); })).toThrow();
});
我也试过了
it('should throw error when foo config value is falsey', (done) => {
const config = { foo: null, bar: 'some-name' };
expect(SelfServiceCompletedJobStore.withConfig(config).load('*', (err, inst) => { })).toThrow();
done();
});
错误信息:
should throw error when foo config value is falsey
- Error: Requires a non-empty foo:String
【问题讨论】:
标签: javascript node.js unit-testing jasmine