我正在尝试用chai,sinon和chaipromise写一个单元测试。:68149) UnhandledPromiseRejectionWarning: Unhandled promiserejection.To terminate the node process on unhandled promiserejection, use the CLI flag `--unhandled-rejections:
为了通过使用sinon和mocha的测试,我试图模拟一个函数。/mocha/lib/runnable.js:379:7)
at Runner.runTest (/home/hs/perso/mockTests/chaiMock/node_modules/mocha/chaiMock/node_modules/
我使用mocha测试框架和chai断言库(我对这3个都是新手)用TypeScript编写了一些测试,发现在下面的代码中抛出了一个错误,并调用了assert.fail()。但是,该测试仍被标记为通过。assert.fail();调试控制台 with existing e-mail in the database
(node:29903) Unhandl