Skip to content

Commit

Permalink
fix broken variable reference and insufficient assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMurx committed Sep 27, 2024
1 parent d299874 commit 96f95c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/pg.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ t.test('PostgreSQL backend', skip, async t => {
const signal = ac.signal;
const promise4 = minion
.result(id, {interval: 10, signal})
.then(value => (failed = value))
.then(value => (finished = value))
.catch(reason => (failed = reason));
setTimeout(() => ac.abort(), 250);
await promise4;
t.same(finished, undefined);
t.strictSame(finished, undefined);
t.same(failed.name, 'AbortError');

finished = undefined;
Expand All @@ -105,10 +105,10 @@ t.test('PostgreSQL backend', skip, async t => {
t.same(await job4.remove(), true);
const promise5 = minion
.result(id, {interval: 10, signal})
.then(value => (failed = value))
.then(value => (finished = value))
.catch(reason => (failed = reason));
await promise5;
t.same(finished, null);
t.strictSame(finished, null);
t.same(failed, undefined);

await worker.unregister();
Expand Down

0 comments on commit 96f95c5

Please sign in to comment.