/
shapshots.test.ts.snap
59 lines (52 loc) · 1.23 KB
/
shapshots.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
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`js snapshots generated correctly 1`] = `
"import { describe, expect, test } from 'vitest'
// when snapshots are generated Vitest reruns \`toMatchInlineSnapshot\` checks
// please, don't commit generated snapshots
describe('snapshots are generated in correct order', async () => {
test('first snapshot', () => {
expect({ foo: ['bar'] }).toMatchInlineSnapshot(\`
Object {
\\"foo\\": Array [
\\"bar\\",
],
}
\`)
})
test('second snapshot', () => {
expect({ foo: ['zed'] }).toMatchInlineSnapshot(\`
Object {
\\"foo\\": Array [
\\"zed\\",
],
}
\`)
})
})
describe('snapshots with properties', () => {
test('without snapshot', () => {
expect({ foo: 'bar' }).toMatchInlineSnapshot({ foo: expect.any(String) }, \`
Object {
\\"foo\\": Any<String>,
}
\`)
})
test('with snapshot', () => {
expect({ foo: 'bar' }).toMatchInlineSnapshot({ foo: expect.any(String) }, \`
Object {
\\"foo\\": Any<String>,
}
\`)
})
})
"
`;
exports[`multiline strings 1`] = `
"
export default function () {
function Foo() {
}
return Foo;
}
"
`;