-
Notifications
You must be signed in to change notification settings - Fork 232
Commit a25993f
feat: react-dom and SSR compatible rendering
- Abstracted rendering out of library core to allow different types of renderers
- Auto-detection of `react-test-renderer` or `react-dom` renderers. Submodules for:
- `dom` (`react-dom`)
- `native` (`react-test-renderer`)
- `server` (`react-dom/server`)
Co-authored-by: Michael Peyper <mpeyper7@gmail.com>
BREAKING CHANGE: Importing from `renderHook` and `act` from `@testing-library/react-hooks` will now auto-detect which renderer to used based on the project's dependencies
- `peerDependencies` are now optional to support different dependencies being required
- This means there will be no warning if the dependency is not installed at all, but it will still warn if an incompatible version is installed1 parent b35b152 commit a25993f
File tree
74 files changed
+2568
-201
lines changed- scripts
- src
- core
- dom
- helpers
- native
- server
- types
- test
- dom
- native
- server
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+2568
-201
lines changedLines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | + | ||
23 | + | ||
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
199 | 201 |
| |
200 | 202 |
| |
201 | 203 |
| |
202 | - | ||
204 | + | ||
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | ||
203 | 209 |
| |
204 | 210 |
| |
205 | 211 |
| |
| |||
450 | 456 |
| |
451 | 457 |
| |
452 | 458 |
| |
453 | - | ||
459 | + |
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
4 | 8 |
| |
5 | 9 |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 | - | ||
10 | 9 |
| |
11 | 10 |
| |
12 | 11 |
| |
13 | 12 |
| |
14 | 13 |
| |
15 | - | ||
14 | + | ||
16 | 15 |
| |
17 | 16 |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
4 | 8 |
| |
5 | - | ||
9 | + | ||
10 | + |
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 | - | ||
169 | + | ||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
| |||
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
192 | - | ||
192 | + | ||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 | - | ||
6 | + | ||
7 | 7 |
|
Lines changed: 21 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 | - | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
18 | 21 |
| |
19 | 22 |
| |
20 | 23 |
| |
| |||
27 | 30 |
| |
28 | 31 |
| |
29 | 32 |
| |
30 | - | ||
33 | + | ||
34 | + | ||
31 | 35 |
| |
32 | 36 |
| |
33 | 37 |
| |
| |||
40 | 44 |
| |
41 | 45 |
| |
42 | 46 |
| |
47 | + | ||
43 | 48 |
| |
44 | 49 |
| |
45 | 50 |
| |
| |||
54 | 59 |
| |
55 | 60 |
| |
56 | 61 |
| |
62 | + | ||
57 | 63 |
| |
64 | + | ||
58 | 65 |
| |
59 | 66 |
| |
60 | 67 |
| |
61 | 68 |
| |
69 | + | ||
62 | 70 |
| |
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | ||
63 | 82 |
| |
64 | 83 |
|
Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
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 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + |
0 commit comments