MCPcopy Create free account
hub / github.com/cli/cli / trial

Function trial

evals/src/cleanup.test.ts:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 let resourcesCleaned = false;
36 let localCleaned = false;
37 async function trial() {
38 try { throw primary; }
39 finally {
40 await cleanupTrial({
41 ...actions(),
42 actor: () => driver.close(),
43 resources: async () => { resourcesCleaned = true; },
44 local: async () => { localCleaned = true; },
45 }, primary, "/trial/resources.json");
46 }
47 }
48 await assert.rejects(trial(), error => {
49 assert.equal(error, primary, "successful cleanup must preserve the original actor error, not manufacture a shutdown failure");
50 assert.doesNotMatch(error.message, /Second actor shutdown|Retry with|evals\/cleanup/);

Callers 1

cleanup.test.tsFile · 0.85

Calls 3

cleanupTrialFunction · 0.85
actionsFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected