n-api: resolve promise in test
The last promise created by the test for the purposes of making sure that its type is indeed a promise needs to be resolved so as to avoid having it left in the pending state at the end of the test. PR-URL: https://github.com/nodejs/node/pull/19245 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
0048169f5e
commit
33e63fe64f
@ -45,7 +45,9 @@ common.crashOnUnhandledRejection();
|
||||
test_promise.concludeCurrentPromise(Promise.resolve('chained answer'), true);
|
||||
}
|
||||
|
||||
assert.strictEqual(test_promise.isPromise(test_promise.createPromise()), true);
|
||||
const promiseTypeTestPromise = test_promise.createPromise();
|
||||
assert.strictEqual(test_promise.isPromise(promiseTypeTestPromise), true);
|
||||
test_promise.concludeCurrentPromise(undefined, true);
|
||||
|
||||
const rejectPromise = Promise.reject(-1);
|
||||
const expected_reason = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user