Skip to content

Commit d8cc334

Browse files
steidamiccy
authored andcommitted
Update Task test to use run parameter
1 parent 11847cf commit d8cc334

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/common/test/Task.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,10 +2859,10 @@ describe("retry", () => {
28592859

28602860
const taskStarted = Promise.withResolvers<void>();
28612861

2862-
const task: Task<string, MyError> = async ({ signal }) => {
2862+
const task: Task<string, MyError> = async (run) => {
28632863
taskStarted.resolve();
2864-
await new Promise((r) => setTimeout(r, 1000));
2865-
void signal.aborted; // Capture for potential assertion
2864+
const result = await run(sleep("1s"));
2865+
if (!result.ok) return result;
28662866
return ok("success");
28672867
};
28682868

0 commit comments

Comments
 (0)