Files
purpur-fantasy-stick/scripts/publish-release.test.ts
T
dmg 05f9627cf9
CI / build (push) Successful in 7m13s
Release / release (push) Failing after 7m47s
build(fantasy-stick): bootstrap tested plugin and release tools
2026-09-16 21:22:01 -04:00

18 lines
760 B
TypeScript

import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
import { test } from "node:test";
for (const environment of [
{ VERSION: "1.2.3", RELEASE_COMMIT: "a".repeat(40) },
{ VERSION: "../../outside", RELEASE_CREDENTIAL: "synthetic-cli-fixture", RELEASE_COMMIT: "a".repeat(40) },
]) {
test(`CLI fails closed on invalid input without echoing environment: ${Object.keys(environment)}`, () => {
const child = spawnSync(process.execPath, ["build/release-tools/publish-release.js"], {
encoding: "utf8", env: environment,
});
assert.equal(child.status, 1);
assert.equal(child.stdout, "");
assert.equal(child.stderr, "Release publication failed; inspect the release state before retrying.\n");
});
}