Commit ff855d7
authored
Chore replaced react-test-renderer with @testing-library/react (#4844)
* Chore replaced react-test-renderer with @testing-library/react
In order to prep for React 19, began conversion from `react-test-renderer` to `@testing-library/react`
- Added new `testing/testSetup.ts` to import `@testing-library/dom`
- Updated all of the `jest.config.json` files to add this to the `setupFilesAfterEnv` for all packages that have snapshots
- Updated all tests NOT in the `snapshot-tests` directory to switch from `react-test-renderer` to `@testing-library/react`
- Updated snapshots accordingly
- Updated `mantine` theme to refactor the `WrappedForm` into its own file
- Updated `shadcn` to properly add `forwardRef` to the `Command` component to avoid an error detected by the `@testing-library/react`
- Updated `getWidget()` test to switch them to snapshot tests
* - Missed a few changes
* - Added mocking for `mantine` and `shadcn` needed for `@testing-library/react`1 parent cd3638f commit ff855d7
File tree
47 files changed
+53436
-53055
lines changed- packages
- antd
- test
- __snapshots__
- chakra-ui
- test
- __snapshots__
- core
- test
- daisyui
- test
- __snapshots__
- fluentui-rc
- mantine
- test
- mui
- primereact
- react-bootstrap
- test
- __snapshots__
- semantic-ui
- test
- __snapshots__
- shadcn
- src/components/ui
- test
- __snapshots__
- snapshot-tests
- utils
- test
- __snapshots__
- testing
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
47 files changed
+53436
-53055
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
11 | 7 | | |
12 | 8 | | |
13 | | - | |
| 9 | + | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 12 | + | |
22 | 13 | | |
23 | 14 | | |
24 | | - | |
25 | | - | |
| 15 | + | |
26 | 16 | | |
27 | 17 | | |
28 | | - | |
| 18 | + | |
29 | 19 | | |
30 | 20 | | |
31 | | - | |
| 21 | + | |
32 | 22 | | |
33 | | - | |
34 | | - | |
| 23 | + | |
| 24 | + | |
35 | 25 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 26 | + | |
| 27 | + | |
45 | 28 | | |
46 | 29 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 30 | + | |
| 31 | + | |
54 | 32 | | |
55 | 33 | | |
56 | | - | |
| 34 | + | |
| 35 | + | |
57 | 36 | | |
58 | 37 | | |
59 | | - | |
| 38 | + | |
60 | 39 | | |
61 | 40 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 41 | + | |
68 | 42 | | |
69 | 43 | | |
70 | | - | |
71 | | - | |
| 44 | + | |
72 | 45 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 46 | + | |
| 47 | + | |
77 | 48 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
91 | 53 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
100 | 61 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
115 | 81 | | |
116 | | - | |
| 82 | + | |
117 | 83 | | |
118 | 84 | | |
119 | | - | |
| 85 | + | |
120 | 86 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 87 | + | |
| 88 | + | |
129 | 89 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | 90 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
151 | 108 | | |
152 | 109 | | |
153 | 110 | | |
154 | 111 | | |
155 | 112 | | |
156 | 113 | | |
157 | 114 | | |
158 | | - | |
159 | | - | |
| 115 | + | |
| 116 | + | |
160 | 117 | | |
161 | 118 | | |
162 | 119 | | |
163 | 120 | | |
164 | 121 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
178 | 132 | | |
179 | 133 | | |
180 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
0 commit comments