mirror of
https://github.com/smogon/sprites.git
synced 2026-12-04 22:18:12 -06:00
Per the house rule, const survives only where TypeScript hangs behavior off the spelling: the <const T> type parameter in rule() and the as const option tables. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 lines
575 B
TypeScript
17 lines
575 B
TypeScript
|
|
import assert from 'node:assert/strict';
|
|
import {test} from 'node:test';
|
|
|
|
import {runShell} from '../exec.ts';
|
|
|
|
test('runShell runs && chains from stdin and reports exit status', async () => {
|
|
let signal = new AbortController().signal;
|
|
let ok = await runShell('echo one && echo two', {cwd: process.cwd(), signal});
|
|
assert.equal(ok.code, 0);
|
|
assert.equal(ok.output, 'one\ntwo\n');
|
|
let bad = await runShell('echo partial && false && echo never', {cwd: process.cwd(), signal});
|
|
assert.equal(bad.code, 1);
|
|
assert.equal(bad.output, 'partial\n');
|
|
});
|
|
|