-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
index.test.ts.snap
121 lines (86 loc) · 3.73 KB
/
index.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ensureNoExpected() throws error when expected is not undefined with matcherName 1`] = `
<d>expect(</><r>received</><d>)[.not].toBeDefined()</>
<b>Matcher error</>: this matcher must not have an expected argument
Expected has type: object
Expected has value: <g>{"a": 1}</>
`;
exports[`ensureNoExpected() throws error when expected is not undefined with matcherName and options 1`] = `
<d>expect(</><r>received</><d>).</>not<d>.</>toBeDefined<d>()</>
<b>Matcher error</>: this matcher must not have an expected argument
Expected has type: object
Expected has value: <g>{"a": 1}</>
`;
exports[`ensureNumbers() throws error when expected is not a number (backward compatibility) 1`] = `
<d>expect(</><r>received</><d>)[.not].toBeCloseTo(</><g>expected</><d>)</>
<b>Matcher error</>: <g>expected</> value must be a number or bigint
Expected has type: string
Expected has value: <g>"not_a_number"</>
`;
exports[`ensureNumbers() throws error when received is not a number (backward compatibility) 1`] = `
<d>expect(</><r>received</><d>)[.not].toBeCloseTo(</><g>expected</><d>)</>
<b>Matcher error</>: <r>received</> value must be a number or bigint
Received has type: string
Received has value: <r>"not_a_number"</>
`;
exports[`ensureNumbers() with options promise empty isNot false received 1`] = `
<d>expect(</><r>received</><d>).</>toBeCloseTo<d>(</><g>expected</><d>, </><g>precision</><d>)</>
<b>Matcher error</>: <r>received</> value must be a number or bigint
Received has type: string
Received has value: <r>""</>
`;
exports[`ensureNumbers() with options promise empty isNot true expected 1`] = `
<d>expect(</><r>received</><d>).</>not<d>.</>toBeCloseTo<d>(</><g>expected</><d>)</>
<b>Matcher error</>: <g>expected</> value must be a number or bigint
Expected has value: <g>undefined</>
`;
exports[`ensureNumbers() with options promise rejects isNot false expected 1`] = `
<d>expect(</><r>received</><d>).</>rejects<d>.</>toBeCloseTo<d>(</><g>expected</><d>)</>
<b>Matcher error</>: <g>expected</> value must be a number or bigint
Expected has type: string
Expected has value: <g>"0"</>
`;
exports[`ensureNumbers() with options promise rejects isNot true received 1`] = `
<d>expect(</><r>received</><d>).</>rejects<d>.</>not<d>.</>toBeCloseTo<d>(</><g>expected</><d>)</>
<b>Matcher error</>: <r>received</> value must be a number or bigint
Received has type: symbol
Received has value: <r>Symbol(0.1)</>
`;
exports[`ensureNumbers() with options promise resolves isNot false received 1`] = `
<d>expect(</><r>received</><d>).</>resolves<d>.</>toBeCloseTo<d>(</><g>expected</><d>)</>
<b>Matcher error</>: <r>received</> value must be a number or bigint
Received has type: boolean
Received has value: <r>false</>
`;
exports[`ensureNumbers() with options promise resolves isNot true expected 1`] = `
<d>expect(</><r>received</><d>).</>resolves<d>.</>not<d>.</>toBeCloseTo<d>(</><g>expected</><d>)</>
<b>Matcher error</>: <g>expected</> value must be a number or bigint
Expected has value: <g>null</>
`;
exports[`printDiffOrStringify expected asymmetric matchers should be diffable 1`] = `
<g>- Expected - 2</>
<r>+ Received + 2</>
<g>- ObjectContaining {</>
<r>+ Object {</>
<d> "array": Array [</>
<d> Object {</>
<d> "3": "three",</>
<d> "four": "4",</>
<d> "one": 1,</>
<g>- "two": 2,</>
<r>+ "two": 1,</>
<d> },</>
<d> ],</>
<d> "foo": "bar",</>
<d> }</>
`;
exports[`stringify() toJSON errors when comparing two objects 1`] = `
<d>expect(</><r>received</><d>).</>toEqual<d>(</><g>expected</><d>) // deep equality</>
<g>- Expected - 1</>
<r>+ Received + 1</>
<d> Object {</>
<g>- "b": 1,</>
<r>+ "a": 1,</>
<d> "toJSON": [Function toJSON],</>
<d> }</>
`;