File tree Expand file tree Collapse file tree
custom-matcher-stack-trace/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff 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
2222exports[` works with custom matchers 1 ` ] = `
Original file line number Diff line number Diff line change 77
88expect . 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}
You can’t perform that action at this time.
0 commit comments