Files
jest/e2e/__tests__/__snapshots__/asyncAndCallback.test.ts.snap

54 lines
1.5 KiB
Plaintext

// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`errors when a test both returns a promise and takes a callback 1`] = `
"FAIL __tests__/promise-and-callback.test.js
✕ promise-returning test with callback
✕ async test with callback
✕ test done before return value
● promise-returning test with callback
Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise.
Returned value: Promise {}
8 | 'use strict';
9 |
> 10 | it('promise-returning test with callback', done => {
| ^
11 | done();
12 |
13 | return Promise.resolve();
at Object.it (__tests__/promise-and-callback.test.js:10:1)
● async test with callback
Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise.
Returned value: Promise {}
14 | });
15 |
> 16 | it('async test with callback', async done => {
| ^
17 | done();
18 | });
19 |
at Object.it (__tests__/promise-and-callback.test.js:16:1)
● test done before return value
Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise.
Returned value: "foobar"
18 | });
19 |
> 20 | it('test done before return value', done => {
| ^
21 | done();
22 |
23 | return 'foobar';
at Object.it (__tests__/promise-and-callback.test.js:20:1)"
`;