From 51b958b866634e40efbdbaa3a3d3adb3b588bc5c Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Thu, 25 Jul 2024 13:49:43 +0100 Subject: [PATCH] tests: update promise test --- integration-tests/execute/test/execute.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integration-tests/execute/test/execute.test.ts b/integration-tests/execute/test/execute.test.ts index d6327fe63..24e48e67c 100644 --- a/integration-tests/execute/test/execute.test.ts +++ b/integration-tests/execute/test/execute.test.ts @@ -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) => {