Skip to content

Commit

Permalink
chore(queue): update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ynwd committed Oct 5, 2024
1 parent 75e7e86 commit ba123b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/queue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ Deno.test("Queue: create message", async () => {
const z = await q.process(() => true);
const o = await q.process(() => ({}));
const v = await q.process(() => {});
const p = await q.process(async () => {
const r = new Promise<string>((resolve) => resolve("hello"));
return await r;
});
assertEquals(x, "x");
assertEquals(y, 1);
assertEquals(z, true);
assertEquals(o, {});
assertEquals(v, undefined);
assertEquals(p, "hello");
});

0 comments on commit ba123b1

Please sign in to comment.