#!/usr/bin/env node import { spawn } from 'node:child_process'; import path from 'node:path'; const root = path.resolve(new URL('..', import.meta.url).pathname); async function run(args) { const [command, ...commandArgs] = args; const code = await new Promise((resolve, reject) => { const child = spawn(command, commandArgs, { cwd: root, env: process.env, stdio: 'inherit', }); child.once('error', reject); child.once('close', (status) => resolve(status ?? 1)); }); if (code !== 0) process.exit(code); } await run([process.execPath, 'scripts/run-release-gate-local-smoke.mjs']); await run([ process.execPath, '--test', 'page-data-public-service.test.mjs', 'admin-routes.test.mjs', 'mindspace-public-asset-token.test.mjs', 'server/portal-mindspace-asset-routes.test.mjs', ]);