Files
purpur-carry/scripts/publish-release.test.ts
T
dmg 23964f7695
Release / release (push) Successful in 3m26s
feat(build): bootstrap Purpur Carry plugin
2026-09-22 21:32:51 -04:00

23 lines
764 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 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");
});
}