mirror of
https://github.com/penpot/penpot.git
synced 2026-07-24 23:18:06 +00:00
- Remove conditional build from test scripts (frontend, common) - Remove test:jvm from common package.json (JVM tests via clojure directly) - Remove test from backend package.json (JVM tests via clojure directly) - Unify common/scripts/test-quiet.js with frontend's BUILD_STEPS pattern - Add execution discipline section to mem:testing (no piping, tee to file) - Add READ mem:testing FIRST directives to module testing docs AI-assisted-by: deepseek-v4-flash
30 lines
838 B
JavaScript
30 lines
838 B
JavaScript
import { spawnSync } from "node:child_process";
|
|
|
|
const BUILD_STEPS = [
|
|
{ label: "Building test bundle", cmd: "pnpm", args: ["run", "build:test"] },
|
|
];
|
|
|
|
const progress = (msg) => process.stderr.write(`${msg}\n`);
|
|
|
|
for (const step of BUILD_STEPS) {
|
|
progress(`${step.label}...`);
|
|
const result = spawnSync(step.cmd, step.args, {
|
|
stdio: ["ignore", "pipe", "pipe"],
|
|
maxBuffer: 64 * 1024 * 1024,
|
|
});
|
|
if (result.status !== 0) {
|
|
progress(`${step.label} failed`);
|
|
if (result.stdout?.length) process.stdout.write(result.stdout);
|
|
if (result.stderr?.length) process.stderr.write(result.stderr);
|
|
process.exit(result.status ?? 1);
|
|
}
|
|
}
|
|
|
|
progress("Running tests...");
|
|
const result = spawnSync(
|
|
"node",
|
|
["target/tests/test.js", ...process.argv.slice(2)],
|
|
{ stdio: "inherit" },
|
|
);
|
|
process.exit(result.status ?? 1);
|