release: WRNexusJS 0.2.78
This commit is contained in:
@@ -2,7 +2,7 @@ import { expect, test } from "bun:test";
|
||||
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { updateApp } from "../src/update.ts";
|
||||
import { updateApp, verificationCommands } from "../src/update.ts";
|
||||
|
||||
test("updateApp migrates project files without marking an unverified update complete", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "wrnexus-update-"));
|
||||
@@ -150,3 +150,21 @@ test("0.2.20 migration repairs only the legacy generated recommendations layout"
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("update verification formats before checking and building", () => {
|
||||
expect(
|
||||
verificationCommands({
|
||||
format: "prettier . --write",
|
||||
check: "bun run lint && bun run format:check",
|
||||
build: "wrnexus build .",
|
||||
}),
|
||||
).toEqual([
|
||||
["run", "format"],
|
||||
["run", "check"],
|
||||
["run", "build"],
|
||||
]);
|
||||
});
|
||||
|
||||
test("update verification skips unavailable scripts", () => {
|
||||
expect(verificationCommands({ check: "bun run lint" })).toEqual([["run", "check"]]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user