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

Function assertAttempt

test/parallel/test-runner-test-rerun-failures.js:200–214  ·  view source on GitHub ↗
(state, attemptIndex)

Source from the content-addressed store, hash-verified

198 const failingInnerSlots = [`${innerLoc}:(2)`, `${innerLoc}:(5)`];
199
200 function assertAttempt(state, attemptIndex) {
201 for (const [key, expected] of Object.entries(expectedInnerSlots)) {
202 assert.deepStrictEqual(state[attemptIndex][key], expected, `attempt ${attemptIndex} missing or wrong entry for ${key}`);
203 }
204 for (const [key, name] of Object.entries(passingParents)) {
205 assert.strictEqual(state[attemptIndex][key]?.name, name, `attempt ${attemptIndex} missing parent ${name} at ${key}`);
206 assert.strictEqual(state[attemptIndex][key]?.passed_on_attempt, 0);
207 }
208 for (const key of failingInnerSlots) {
209 assert.strictEqual(state[attemptIndex][key], undefined, `attempt ${attemptIndex} should not record failing inner at ${key}`);
210 }
211 for (const key of failingParentSlots) {
212 assert.strictEqual(state[attemptIndex][key], undefined, `attempt ${attemptIndex} should not record failing parent at ${key}`);
213 }
214 }
215
216 // Attempt 0: F and B fail.
217 let { code, signal } = await common.spawnPromisified(process.execPath, args);

Calls 1

entriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…