-
Notifications
You must be signed in to change notification settings - Fork 968
/
component.test.ts.snap
121 lines (95 loc) · 2.38 KB
/
component.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[`creates a TS component and test 1`] = `
"const TypescriptUser = () => {
return (
<div>
<h2>{'TypescriptUser'}</h2>
<p>{'Find me in ./web/src/components/TypescriptUser/TypescriptUser.tsx'}</p>
</div>
)
}
export default TypescriptUser
"
`;
exports[`creates a TS component and test 2`] = `
"import { render } from '@redwoodjs/testing/web'
import TypescriptUser from './TypescriptUser'
// Improve this test with help from the Redwood Testing Doc:
// https://redwoodjs.com/docs/testing#testing-components
describe('TypescriptUser', () => {
it('renders successfully', () => {
expect(() => {
render(<TypescriptUser />)
}).not.toThrow()
})
})
"
`;
exports[`creates a multi word component 1`] = `
"const UserProfile = () => {
return (
<div>
<h2>{'UserProfile'}</h2>
<p>{'Find me in ./web/src/components/UserProfile/UserProfile.js'}</p>
</div>
)
}
export default UserProfile
"
`;
exports[`creates a multi word component story 1`] = `
"import UserProfile from './UserProfile'
export const generated = () => {
return <UserProfile />
}
export default { title: 'Components/UserProfile' }
"
`;
exports[`creates a multi word component test 1`] = `
"import { render } from '@redwoodjs/testing/web'
import UserProfile from './UserProfile'
// Improve this test with help from the Redwood Testing Doc:
// https://redwoodjs.com/docs/testing#testing-components
describe('UserProfile', () => {
it('renders successfully', () => {
expect(() => {
render(<UserProfile />)
}).not.toThrow()
})
})
"
`;
exports[`creates a single word component 1`] = `
"const User = () => {
return (
<div>
<h2>{'User'}</h2>
<p>{'Find me in ./web/src/components/User/User.js'}</p>
</div>
)
}
export default User
"
`;
exports[`creates a single word component story 1`] = `
"import User from './User'
export const generated = () => {
return <User />
}
export default { title: 'Components/User' }
"
`;
exports[`creates a single word component test 1`] = `
"import { render } from '@redwoodjs/testing/web'
import User from './User'
// Improve this test with help from the Redwood Testing Doc:
// https://redwoodjs.com/docs/testing#testing-components
describe('User', () => {
it('renders successfully', () => {
expect(() => {
render(<User />)
}).not.toThrow()
})
})
"
`;