confirm() prints 'declined: <reason>' and exits 3 whenever the answer is no or nobody can answer (not a terminal without --yes, serve without the owner's dialog), so no command reports success after declining. flow run stops at such a step with 'step N declined: <reason>' (status declined), never ok. flow run --apply --yes passes --yes to write steps only; --yes without --apply is refused. Pitfall 24.
10 lines
582 B
TypeScript
10 lines
582 B
TypeScript
// Loaded before every test file (bunfig.toml): no real waiting between the re-checks of cli/lib/upsert.ts or for
|
|
// the store's list to settle after a create (cli/apple/iap.ts).
|
|
import { afterEach } from 'bun:test';
|
|
|
|
process.env.STOREBOUND_UPSERT_WAIT_MS = '0';
|
|
process.env.STOREBOUND_LIST_SETTLE_MS ??= '0';
|
|
|
|
// Commands run in-process set process.exitCode on purpose (a check with problems, a declined confirmation:
|
|
// DECLINED_EXIT in cli/lib/ctx.ts). Tests assert it where it matters; it must not leak into bun test's own exit code.
|
|
afterEach(() => { process.exitCode = 0; });
|