test: pick the child-process command from the host runtime
The exit test spawns a probe and asserts it dies on its own, and the contract files run unchanged on three runtimes — so the argv has to be decided at run time rather than written for Node and skipped elsewhere. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
2 files changed
+36
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { strict as assert } from 'node:assert';
|
||||
import { test } from 'node:test';
|
||||
|
||||
import { runtimeCommand } from './helpers.ts';
|
||||
|
||||
test('runtimeCommand names an executable and passes the script last', () => {
|
||||
const { command, args } = runtimeCommand('some/probe.ts');
|
||||
|
||||
assert.ok(command.length > 0, 'no command');
|
||||
assert.equal(args.at(-1), 'some/probe.ts');
|
||||
});
|
||||
Reference in new issue
Block a user