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
On this line we are checking that the set of unhandled rejection listeners on the process matches a single-element set with the one listener we expect to be there:
Mocha 8.2.0 introduced a change over 8.1.3 which adds a global listener for unhandled promise rejections which precedes the expected one in the set and makes the set a different size than what is expected. This breaks this test.
To fix the test, instead of comparing the set of global listeners to a fixed expected set, we should iterate over the listeners in the global set and just verify that the expected one is in there, ignoring any others that might also be.
Alongside this, the version of Mocha listed under devDependencies in package.json should be updated to 8.2.0. Then also test with the latest version of Mocha and if it still works, update that all the way to whatever the current version is.
The text was updated successfully, but these errors were encountered:
helpers.reject('wtf this rejection').then(done());
None of the code in the write callback is being executed. The way done() is being called ends the test. It looks like it has never actually done anything. I'm looking into it.
On this line we are checking that the set of unhandled rejection listeners on the process matches a single-element set with the one listener we expect to be there:
winston/test/rejection-handler.test.js
Line 102 in 955dffa
Mocha 8.2.0 introduced a change over 8.1.3 which adds a global listener for unhandled promise rejections which precedes the expected one in the set and makes the set a different size than what is expected. This breaks this test.
To fix the test, instead of comparing the set of global listeners to a fixed expected set, we should iterate over the listeners in the global set and just verify that the expected one is in there, ignoring any others that might also be.
Alongside this, the version of Mocha listed under devDependencies in package.json should be updated to 8.2.0. Then also test with the latest version of Mocha and if it still works, update that all the way to whatever the current version is.
The text was updated successfully, but these errors were encountered: