okIn

tcmts.cli.test.e2e.harness.okIn · #ohcgazkp · term · runs on the server

uses tcmts.cli.test.e2e.harness.tcmIn, which uses node:child_process

Run tcm in dir, failing the test if it fails: what it printed.

import { tcmIn } from "#codebase/tcmts/cli/test/e2e/harness";

export function okIn(dir: string, ...args: string[]): string {
  const r = tcmIn(dir, ...args);
  if (r.status !== 0) throw new Error(`tcm ${args.join(" ")} exited ${r.status}:\n${r.out}`);
  return r.out;
}

uses

used by