Skip to content

Commit

Permalink
tests: update promise test
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjclark committed Jul 25, 2024
1 parent 065e158 commit 51b958b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration-tests/execute/test/execute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ test.serial('catch an error and re-throw it', async (t) => {
};

const job = `fn(() => {
throw { err: true }
throw new Error('err')
}).catch(e => { throw e })`;

const result = await execute(job, state);
t.is(result.errors['job-1'].type, 'JobError');
t.is(result.errors['job-1'].name, 'JobError');
t.is(result.errors['job-1'].message, 'err');
});

test.serial('catch an error and return state', async (t) => {
Expand Down

0 comments on commit 51b958b

Please sign in to comment.