mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-19 11:22:21 +02:00
test(browse): subprocess budget for the polyfill suite on Windows CI
Every test here spawnSync's a node child; cold-start on the Windows runner (AV scan, first node.exe touch) blew bun's 5s default by 7ms on a 50ms sleep test. File-level 20s default — subprocess budget, not assertion looseness.
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
import { describe, test, expect, afterAll } from 'bun:test';
|
import { describe, test, expect, afterAll, setDefaultTimeout } from 'bun:test';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
|
// Every test here spawnSync's a `node` child; Windows CI cold-start (AV scan,
|
||||||
|
// first-touch of node.exe) alone can blow bun's 5s default — observed 5,007ms
|
||||||
|
// on a 50ms sleep test. Subprocess budget, not assertion looseness.
|
||||||
|
setDefaultTimeout(20_000);
|
||||||
|
|
||||||
// Load the polyfill into a fresh object (don't clobber globalThis.Bun)
|
// Load the polyfill into a fresh object (don't clobber globalThis.Bun)
|
||||||
const polyfillPath = path.resolve(import.meta.dir, '../src/bun-polyfill.cjs');
|
const polyfillPath = path.resolve(import.meta.dir, '../src/bun-polyfill.cjs');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user