Skip to content

Commit

Permalink
fix JASMINE tests
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Oct 11, 2022
1 parent f45b04e commit 1f8e2b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/jest-each/src/bind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ export default function bind<EachCallback extends Global.TestCallback>(
),
);
} catch (e: any) {
const err = new Error(e.message);
// For JASMINE, we must drop the message and name

const err = new Error('');
err.stack = error.stack?.replace(/^Error: /s, e.message);
err.name = e.name;
err.name = '';

return cb(title, () => {
throw err;
Expand Down

0 comments on commit 1f8e2b5

Please sign in to comment.