-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
junit.test.ts.snap
116 lines (111 loc) · 4.25 KB
/
junit.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
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`emits <failure> when beforeAll/afterAll failed 1`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="8" failures="2" errors="0" time="...">
<testsuite name="basic.test.ts" timestamp="..." hostname="..." tests="8" failures="2" errors="0" skipped="2" time="...">
<testcase classname="basic.test.ts" name="suite with beforeAll > ok 1" time="...">
</testcase>
<testcase classname="basic.test.ts" name="suite with beforeAll > ok 2" time="...">
</testcase>
<testcase classname="basic.test.ts" name="suite with beforeAll > skip 1" time="...">
<skipped/>
</testcase>
<testcase classname="basic.test.ts" name="suite with afterAll > ok 1" time="...">
</testcase>
<testcase classname="basic.test.ts" name="suite with afterAll > ok 2" time="...">
</testcase>
<testcase classname="basic.test.ts" name="suite with afterAll > skip 1" time="...">
<skipped/>
</testcase>
<testcase classname="basic.test.ts" name="suite with beforeAll" time="...">
<failure message="beforeAll error" type="Error">
Error: beforeAll error
❯ basic.test.ts:10:11
</failure>
</testcase>
<testcase classname="basic.test.ts" name="suite with afterAll" time="...">
<failure message="afterAll error" type="Error">
Error: afterAll error
❯ basic.test.ts:20:11
</failure>
</testcase>
</testsuite>
</testsuites>
"
`;
exports[`format error 1`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="8" errors="0" time="...">
<testsuite name="error.test.ts" timestamp="..." hostname="..." tests="9" failures="8" errors="0" skipped="0" time="...">
<testcase classname="error.test.ts" name="stack" time="...">
<failure message="throwSimple" type="Error">
Error: throwSimple
❯ throwSimple error.test.ts:44:9
❯ throwDeep error.test.ts:40:3
❯ error.test.ts:8:3
</failure>
</testcase>
<testcase classname="error.test.ts" name="diff" time="...">
<failure message="expected { hello: 'x' } to deeply equal { hello: 'y' }" type="AssertionError">
AssertionError: expected { hello: 'x' } to deeply equal { hello: 'y' }
- Expected
+ Received
Object {
- "hello": "y",
+ "hello": "x",
}
❯ error.test.ts:12:26
</failure>
</testcase>
<testcase classname="error.test.ts" name="unhandled" time="...">
</testcase>
<testcase classname="error.test.ts" name="no name object" time="...">
<failure>
{
noName: 'hi',
expected: 'undefined',
actual: 'undefined',
stacks: []
}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { noName: 'hi' }
</failure>
</testcase>
<testcase classname="error.test.ts" name="string" time="...">
<failure message="hi">
Unknown Error: hi
</failure>
</testcase>
<testcase classname="error.test.ts" name="number" time="...">
<failure message="1234">
Unknown Error: 1234
</failure>
</testcase>
<testcase classname="error.test.ts" name="number name object" time="...">
<failure type="1234">
{
name: 1234,
nameStr: '1234',
expected: 'undefined',
actual: 'undefined',
stacks: []
}
</failure>
</testcase>
<testcase classname="error.test.ts" name="xml" time="...">
<failure message="error message that has XML in it <div><input/></div>" type="Error">
Error: error message that has XML in it <div><input/></div>
❯ error.test.ts:36:9
</failure>
</testcase>
<testcase classname="error.test.ts" name="error.test.ts" time="...">
<failure message="throwSuite" type="Error">
Error: throwSuite
❯ throwSuite error.test.ts:48:9
❯ error.test.ts:4:3
</failure>
</testcase>
</testsuite>
</testsuites>
"
`;