Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13a3763

Browse files
authored
Update asyncError.test.ts
1 parent 76043aa commit 13a3763

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/jest-circus/src/__tests__/asyncError.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe('async error handling', () => {
55
test('inner test', (innerDone: any) => {
66
// simulate async error path (where asyncError can be undefined)
77
Promise.resolve().then(() => {
8-
throw {status: 403, message: 'Forbidden'};
8+
throw Object.assign(new Error('Forbidden'), {status: 403});
99
});
1010

1111
innerDone();

0 commit comments

Comments
 (0)