| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9f5547a commit 60f008b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -302,12 +302,18 @@ describe('describe async throw fails', async () => { | |||
| 302 | 302 | describe('timeouts', () => { | |
| 303 | 303 | it('timed out async test', { timeout: 5 }, async () => { | |
| 304 | 304 | return new Promise((resolve) => { | |
| 305 | - setTimeout(resolve, 100); | ||
| 305 | + setTimeout(() => { | ||
| 306 | + // Empty timer so the process doesn't exit before the timeout triggers. | ||
| 307 | + }, 5); | ||
| 308 | + setTimeout(resolve, 30_000_000).unref(); | ||
| 306 | 309 | }); | |
| 307 | 310 | }); | |
| 308 | 311 | ||
| 309 | 312 | it('timed out callback test', { timeout: 5 }, (t, done) => { | |
| 310 | - setTimeout(done, 100); | ||
| 313 | + setTimeout(() => { | ||
| 314 | + // Empty timer so the process doesn't exit before the timeout triggers. | ||
| 315 | + }, 5); | ||
| 316 | + setTimeout(done, 30_000_000).unref(); | ||
| 311 | 317 | }); | |
| 312 | 318 | ||
| 313 | 319 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments