You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chai-as-promised does not work with Promise.delay API of bluebird.
Mocha will give me timeout error:
test
1) should work
0 passing (5s)
1 failing
1) test
should work:
Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called;if returning a Promise, ensure it resolves. (/Users/ldu020/workspace/github.com/mrdulin/expressjs-research/src/stackoverflow/35381245-todo/index.test.js)
If I create my own Promise.delay method with native promise, it works fine with chai-as-promised and sinon.useFakeTimers().
But, if I use the Promise.delay method of bluebird, it won't work. No matter whether you use const Promise = require('bluebird'); or global.Promise = require('bluebird');, both of them do not work
Environment information:
node: v10.16.2
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"mocha": "^8.2.1",
"sinon": "^8.1.1",
"bluebird": "^3.7.2",
The text was updated successfully, but these errors were encountered:
Related issue: #169
chai-as-promised
does not work with Promise.delay API of bluebird.Mocha will give me timeout error:
Here is a minimal, reproducibe example:
If I create my own
Promise.delay
method with native promise, it works fine withchai-as-promised
andsinon.useFakeTimers()
.But, if I use the
Promise.delay
method ofbluebird
, it won't work. No matter whether you useconst Promise = require('bluebird');
orglobal.Promise = require('bluebird');
, both of them do not workEnvironment information:
v10.16.2
The text was updated successfully, but these errors were encountered: