| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3abd71a commit 36227ed
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,8 +94,10 @@ describe('watch mode', { concurrency: true, timeout: 60_0000 }, () => { | |||
| 94 | 94 | const file = fixtures.path('watch-mode/failing.js'); | |
| 95 | 95 | const { stderr, stdout } = await spawnWithRestarts({ file }); | |
| 96 | 96 | ||
| 97 | + // Use match first to pretty print diff on failure | ||
| 97 | 98 | assert.match(stderr, /Error: fails\r?\n/); | |
| 98 | - assert.strictEqual(stderr.match(/Error: fails\r?\n/g).length, 2); | ||
| 99 | + // Test that failures happen once per restart | ||
| 100 | + assert(stderr.match(/Error: fails\r?\n/g).length >= 2); | ||
| 99 | 101 | assertRestartedCorrectly({ | |
| 100 | 102 | stdout, | |
| 101 | 103 | messages: { completed: `Failed running ${inspect(file)}`, restarted: `Restarting ${inspect(file)}` }, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments