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
Even though the tests reports as passed, I'm seeing this in the output.
Running test 'object/finalizer'
(node:1257166) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: function should not have been called
at mustNotCall (/home/midawson/newpull/land/node-addon-api/test/common/index.js:74:12)
(Use node --trace-warnings ... to show where the warning was created)
(node:1257166) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1257166) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Fixed for this particular case on #937. The problems was that, because of a side effect cause by a new test, common.mustNotCall() was invoked.
Even though it is fixed, the tests finish with OK status, so it is easy to overlook the issue.
Maybe, a proper fix is adding an optional parameter to the common.mustNotCall() signature indicating if the execution of the tests should end with status -1.
Activity
mhdawson commentedon Mar 15, 2021
Turns out that it was because of an PR I'd just landed: #928
I reverted that PR, but leaving it open so we don't forget to figure out the issue and get the PR re-landed.
[-]Finalizer should not have run - Nodejs 14.x [/-][+]Finalizer should not have run[/+]Fix nodejs#932: Rename the function callback async context so it does…
JoseExposito commentedon Mar 17, 2021
Fixed for this particular case on #937. The problems was that, because of a side effect cause by a new test,
common.mustNotCall()was invoked.Even though it is fixed, the tests finish with OK status, so it is easy to overlook the issue.
Maybe, a proper fix is adding an optional parameter to the
common.mustNotCall()signature indicating if the execution of the tests should end with status-1.mhdawson commentedon Mar 22, 2021
@JoseExposito thanks for working on the fix.
mhdawson commentedon Mar 22, 2021
Closing as the new PR has landed