Skip to content

Commit e136b8d

Browse files
committed
chore: fix test for node 6
1 parent 00bd060 commit e136b8d

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

e2e/__tests__/__snapshots__/customMatcherStackTrace.test.js.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ FAIL __tests__/asynchronous.test.js
99
We expect the stack trace and code fence for this matcher to be shown in the console.
1010
1111
9 |
12-
10 | test('showing the stack trace for an async matcher', async () => {
13-
> 11 | await expect(true).toThrowCustomAsyncMatcherError();
14-
| ^
15-
12 | });
16-
13 |
17-
14 | async function toThrowCustomAsyncMatcherError() {
18-
19-
at Object.toThrowCustomAsyncMatcherError (__tests__/asynchronous.test.js:11:22)
12+
10 | test('showing the stack trace for an async matcher', () =>
13+
> 11 | expect(true).toThrowCustomAsyncMatcherError());
14+
| ^
15+
12 |
16+
13 | function toThrowCustomAsyncMatcherError() {
17+
14 | const message = () =>
18+
19+
at Object.toThrowCustomAsyncMatcherError (__tests__/asynchronous.test.js:11:16)
2020
`;
2121
2222
exports[`works with custom matchers 1`] = `

e2e/custom-matcher-stack-trace/__tests__/asynchronous.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77

88
expect.extend({toThrowCustomAsyncMatcherError});
99

10-
test('showing the stack trace for an async matcher', async () => {
11-
await expect(true).toThrowCustomAsyncMatcherError();
12-
});
10+
test('showing the stack trace for an async matcher', () =>
11+
expect(true).toThrowCustomAsyncMatcherError());
1312

14-
async function toThrowCustomAsyncMatcherError() {
13+
function toThrowCustomAsyncMatcherError() {
1514
const message = () =>
1615
'We expect the stack trace and code fence for this matcher to be shown in the console.';
17-
return {message, pass: false};
16+
return Promise.resolve({message, pass: false});
1817
}

0 commit comments

Comments
 (0)