/
asyncAndCallback.test.ts.snap
59 lines (40 loc) · 1.6 KB
/
asyncAndCallback.test.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Jest Snapshot v1, https://goo.gl/fbAQLP
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 take a 'done' callback and return anything. Make sure to _only_ use a callback or promises - not both
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 take a 'done' callback and return anything. Make sure to _only_ use a callback or promises - not both
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 take a 'done' callback and return anything. Make sure to _only_ use a callback or promises - not both
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)
`;