#!/usr/bin/env node import { spawn } from "node:child_process"; import path from "node:path"; import { fileURLToPath } from "node:url"; const testsDir = path.dirname(fileURLToPath(import.meta.url)); const testFiles = [ path.join(testsDir, "functions.test.mjs"), path.join(testsDir, "lib-contracts.test.mjs"), path.join(testsDir, "sales-prompts.test.mjs"), ]; const child = spawn(process.execPath, ["--test", ...testFiles], { stdio: "inherit", env: process.env, }); child.on("close", (code) => { process.exitCode = code ?? 1; });