tstyche
Version:
Everything You Need for Type Testing.
13 lines (10 loc) • 392 B
JavaScript
import { Cli } from './api.js';
async function tstyche(template, ...substitutions) {
const cli = new Cli();
const commandLine = String.raw(template, ...substitutions).split(/\s+/);
const exitCode = await cli.run(commandLine);
if (exitCode > 0) {
throw new Error("TSTyche test run failed. Check the output above for details.");
}
}
export { tstyche as default };