mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 16:34:00 +01:00
test: spawn scripts/size-ledger.ts with bunIsolationArgs() so native Windows Bun starts it
The CLI test passed --config=/dev/null, which native Bun on Windows cannot open
(#3415); Windows Free Tests shard 6 failed at 4143373 with exit 1 and empty stdout.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
4143373fe0
commit
f7e77da7d1
1 file changed
+2
-1
@@ -13,6 +13,7 @@ import { spawnSync } from 'child_process';
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import { bunIsolationArgs } from '../lib/bun-isolation';
|
||||
import { buildChain } from '../lib/ship-queue-train';
|
||||
import { DEFAULT_POLICY } from '../lib/ship-policy';
|
||||
import { CARVE_GUARDS } from './helpers/carve-guards';
|
||||
@@ -205,7 +206,7 @@ describe('ship is on the ledger', () => {
|
||||
});
|
||||
// Value: protects=the scripts/size-ledger.ts CLI contract lanes run (check exits 0 with SIZE_LEDGER: ok on a tree the ledger accounts for; record refuses on main or without --why, fold without --measured-at, a skill with no ledger; none of them writes); fails_when=a refusal is dropped, an exit code changes or a refused call writes an entry; why_new=the tests above call the helpers, never the script; seam=none; no_claim=the exit-1 mismatch path (needs a ship tree off the ledger)
|
||||
test('scripts/size-ledger.ts checks this tree and refuses unsafe calls without writing', () => {
|
||||
const run = (...args: string[]) => spawnSync(process.execPath, ['--no-env-file', '--config=/dev/null', path.join(repo, 'scripts/size-ledger.ts'), ...args], { cwd: repo, encoding: 'utf-8', timeout: 60_000 });
|
||||
const run = (...args: string[]) => spawnSync(process.execPath, [...bunIsolationArgs(), path.join(repo, 'scripts/size-ledger.ts'), ...args], { cwd: repo, encoding: 'utf-8', timeout: 60_000 });
|
||||
const dir = path.join(repo, 'test/size-ledger/ship');
|
||||
const before = fs.readdirSync(dir).sort();
|
||||
const check = run('check', 'ship');
|
||||
|
||||
Reference in new issue
Block a user