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

Function assertState

test/parallel/test-promise-hook-create-hook.js:43–55  ·  view source on GitHub ↗
(expectedInit, expectedInitParent, expectedBefore,
                     expectedAfter, expectedSettled)

Source from the content-addressed store, hash-verified

41
42// Clears state on each check so only the delta needs to be checked.
43function assertState(expectedInit, expectedInitParent, expectedBefore,
44 expectedAfter, expectedSettled) {
45 assert.strictEqual(init, expectedInit);
46 assert.strictEqual(initParent, expectedInitParent);
47 assert.strictEqual(before, expectedBefore);
48 assert.strictEqual(after, expectedAfter);
49 assert.strictEqual(settled, expectedSettled);
50 init = undefined;
51 initParent = undefined;
52 before = undefined;
53 after = undefined;
54 settled = undefined;
55}
56
57const parent = Promise.resolve(1);
58// After calling `Promise.resolve(...)`, the returned promise should have

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…