Commit 8caa9a1
committed
Refactor Jest configuration and enhance testing utilities
- Removed Node version checks and related module name mappings from jest.config.js to simplify configuration.
- Cleaned up jest.setup.js by removing the mock for fetch that converted Node's Readable stream to a web-standard ReadableStream.
- Introduced new utility functions in testUtils.js for creating Node.js Readable streams and retrieving the Node version.
- Added new tests for fetch functionality that validate streaming behavior with Readable streams.
- Created emptyForTesting.js to facilitate testing in environments where certain modules need to be mocked.
These changes improve the clarity and maintainability of the testing setup in the react-on-rails and react-on-rails-pro packages.1 parent b1e6462 commit 8caa9a1
File tree
7 files changed
+0
-37
lines changed- packages
- react-on-rails-pro/tests
- fixtures/rsc-payloads/simple-shell-with-async-component
- react-on-rails
- tests
7 files changed
+0
-37
lines changedFile renamed without changes.
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 16 | | |
30 | 17 | | |
31 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 19 | | |
44 | 20 | | |
45 | 21 | | |
| |||
0 commit comments