pi-ext
bugabingas pi extensions
owned by bugabinga
test(nu-bang): relax real-world timing
2cddca86b07ff75ad12d663e8ae523003a756437
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (1)
extensions/nu-bang/__tests__/real-world.test.ts
Modified228 228 controller.signal,
230 - expect(
Date.
now()
- started).
toBeLessThan(
1000);
230 + expect(
Date.
now()
- started).
toBeLessThan(
2000);
231 231 expect(result.cancelled).
toBe(
true);
245 245 const timeout
= new Promise<
never>((_, reject)
=> 247 247 ()
=> reject(
new Error(
"timed out waiting for streamed output")),
272 272 test(
"does not wait for background children that inherit stdio",
async ()
=> {
273 273 const started
= Date.
now();
274 - const result
= await run(
'^bash -lc "sleep 1.2 & echo done"');
275 - expect(
Date.
now()
- started).
toBeLessThan(
1000);
274 + const result
= await run(
'^bash -lc "sleep 4 & echo done"');
275 + expect(
Date.
now()
- started).
toBeLessThan(
3500);
276 276 expect(result.exitCode).
toBe(
0);
277 277 expect(result.output).
toBe(
"done\n");