MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-primordials-promise.js:115–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113assertIsPromise(SafePromiseAllSettledReturnVoid([]));
114
115async function test() {
116 const catchFn = common.mustCall();
117 const finallyFn = common.mustCall();
118
119 try {
120 await Promise.reject();
121 } catch {
122 catchFn();
123 } finally {
124 finallyFn();
125 }
126}
127
128function assertIsPromise(promise) {
129 // Make sure the returned promise is a genuine %Promise% object and not a

Callers 1

Calls 1

rejectMethod · 0.80

Tested by

no test coverage detected