Commit e7311f7
authored
test: ignore unstable snap-test output (#329)
### TL;DR
Added support for ignoring "npm notice Access token expired or revoked" warnings in test output.
### What changed?
- Added a new regex pattern in `replaceUnstableOutput()` function to filter out "npm notice Access token expired or revoked" warning messages
- Added a corresponding test case to verify the new functionality
- Updated test snapshots to include the new test case
### How to test?
1. Run the test suite to verify that the new test case passes
2. Verify that when running commands that might produce the "npm notice Access token expired or revoked" warning, these messages are properly filtered out from the output
### Why make this change?
These npm access token warnings are non-deterministic and can cause test failures when they appear in output that's being compared against snapshots. By filtering them out, we improve test stability and prevent false negatives in test runs.1 parent 5577e9f commit e7311f7
3 files changed
Lines changed: 20 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
173 | 185 | | |
174 | 186 | | |
175 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
0 commit comments