【发布时间】:2016-02-19 07:33:42
【问题描述】:
我不知道为什么,但这会将成功返回为挂起,但失败的成功返回失败,使用 mocha 进行测试
describe('createToken', function() {
it('should return the token', utils.createToken('somestring', function(err, auth){
expect(typeof auth.token).to.equal('string'); // pending but should be success
expect(err).to.equal(null); // pending
expect(true).to.equal(false); // fail
}));
})
我和这段代码有什么问题?提前致谢。
【问题讨论】:
标签: node.js unit-testing express mocha.js chai