-
Notifications
You must be signed in to change notification settings - Fork 232
Commit de58cb0
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`)
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 installed
Co-authored-by: Michael Peyper <mpeyper7@gmail.com>1 parent 08d5bb4 commit de58cb0
File tree
74 files changed
+2781
-211
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
+2781
-211
lines changedLines changed: 192 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 | + | ||
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
| |||
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
19 | - | ||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 | - | ||
24 | - | ||
25 | - | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
204 | - | ||
204 | + | ||
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | ||
209 | + | ||
205 | 210 |
| |
206 | 211 |
| |
207 | 212 |
| |
| |||
270 | 275 |
| |
271 | 276 |
| |
272 | 277 |
| |
278 | + | ||
279 | + | ||
280 | + | ||
281 | + | ||
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | ||
286 | + | ||
287 | + | ||
288 | + | ||
289 | + | ||
290 | + | ||
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | ||
295 | + | ||
296 | + | ||
297 | + | ||
298 | + | ||
299 | + | ||
300 | + | ||
301 | + | ||
302 | + | ||
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | ||
307 | + | ||
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | ||
317 | + | ||
318 | + | ||
319 | + | ||
320 | + | ||
321 | + | ||
322 | + | ||
323 | + | ||
324 | + | ||
325 | + | ||
326 | + | ||
327 | + | ||
328 | + | ||
329 | + | ||
330 | + | ||
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | ||
335 | + | ||
336 | + | ||
337 | + | ||
338 | + | ||
339 | + | ||
340 | + | ||
341 | + | ||
342 | + | ||
343 | + | ||
344 | + | ||
345 | + | ||
346 | + | ||
347 | + | ||
348 | + | ||
349 | + | ||
350 | + | ||
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | ||
355 | + | ||
356 | + | ||
357 | + | ||
358 | + | ||
359 | + | ||
360 | + | ||
361 | + | ||
362 | + | ||
363 | + | ||
364 | + | ||
365 | + | ||
366 | + | ||
367 | + | ||
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | ||
372 | + | ||
373 | + | ||
374 | + | ||
375 | + | ||
376 | + | ||
377 | + | ||
378 | + | ||
379 | + | ||
380 | + | ||
381 | + | ||
382 | + | ||
383 | + | ||
384 | + | ||
385 | + | ||
386 | + | ||
387 | + | ||
388 | + | ||
389 | + | ||
390 | + | ||
391 | + | ||
392 | + | ||
393 | + | ||
394 | + | ||
395 | + | ||
396 | + | ||
397 | + | ||
398 | + | ||
399 | + | ||
400 | + | ||
401 | + | ||
402 | + | ||
403 | + | ||
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | ||
408 | + | ||
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | ||
413 | + | ||
414 | + | ||
415 | + | ||
416 | + | ||
417 | + | ||
418 | + | ||
419 | + | ||
420 | + | ||
421 | + | ||
422 | + | ||
423 | + | ||
424 | + | ||
425 | + | ||
426 | + | ||
427 | + | ||
428 | + | ||
429 | + | ||
430 | + | ||
431 | + | ||
432 | + | ||
433 | + | ||
434 | + | ||
435 | + | ||
436 | + | ||
437 | + | ||
438 | + | ||
439 | + | ||
440 | + | ||
441 | + | ||
442 | + | ||
443 | + | ||
444 | + | ||
445 | + | ||
446 | + | ||
447 | + | ||
448 | + | ||
449 | + | ||
450 | + | ||
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | ||
455 | + | ||
456 | + | ||
457 | + | ||
273 | 458 |
| |
274 | - | ||
275 | - | ||
276 | - | ||
459 | + | ||
460 | + |
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 | + |
0 commit comments