Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
JavaScript
1234567891011121314151617181920212223242526272829import assert from "node:assert/strict";import { execFileSync } from "node:child_process";import { readFile } from "node:fs/promises";import { test } from "node:test";
test("publisher packaging emits only latest and rejects retained inputs", async () => { const build = (retained, args = []) => execFileSync( process.execPath, ["scripts/build-catalog.mjs", "--development-fixture", ...args], { env: { ...process.env, FLAREBOT_RETAINED_RELEASES: JSON.stringify(retained), }, encoding: "utf8", stdio: "pipe", }, ); assert.throws(() => build(["/tmp/old-release"]), /latest-only catalog/); assert.throws( () => build([], ["--retain=/tmp/old-release"]), /latest-only catalog/, ); assert.match(build([]), /latest immutable release/); const catalog = await readFile("dist/catalog/catalog.ts", "utf8"); assert.equal((catalog.match(/identity:/g) ?? []).length, 1);});