Repository navigation
Commit 7a5d4de
authored
Mute console.log in remove-spm-injection-test.js
## Summary:
The JavaScript test job in CI prints hundreds of `[generate-spm-xcodeproj]` log lines.
All of them come from one test file, `remove-spm-injection-test.js`. Its tests set up the SwiftPM injection in a new temporary app many times. Each setup prints up to 5 lines: 3 for stub `Package.swift` files, 1 for the project file, and 1 for the scheme. The file did not mute `console.log`, so it printed 584 lines in one run.
This change mutes `console.log` for every test in that file, and restores it after each test. `generate-spm-xcodeproj-test.js` already does the same thing. Only the test changes. The SwiftPM scripts log the same as before.
## Changelog:
[INTERNAL] [CHANGED] - Mute console.log in remove-spm-injection-test.js
## Test Plan:
```
yarn jest --no-cache -i packages/react-native/scripts/spm/__tests__/remove-spm-injection-test.js
```
| | Before | After |
|---|---|---|
| Tests | 100 passed | 100 passed |
| `[generate-spm-xcodeproj]` lines in the output | 584 | 0 |
The one test that checks log output (`Kept ReactNativeSPM/…`) uses its own spy and still passes.
Differential Revision: D132257870
Pull Request resolved: #600221 parent c8b6201 commit 7a5d4de
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
706 | 712 | | |
707 | 713 | | |
708 | 714 | | |
709 | | - | |
| 715 | + | |
710 | 716 | | |
711 | 717 | | |
712 | 718 | | |
713 | 719 | | |
714 | | - | |
715 | 720 | | |
716 | 721 | | |
717 | 722 | | |
| |||
0 commit comments