15 lines
809 B
JavaScript
15 lines
809 B
JavaScript
import assert from "node:assert/strict";
|
|
import { readFile } from "node:fs/promises";
|
|
import test from "node:test";
|
|
|
|
test("bun-command artifact Dockerfile installs native Bun binary without npm postinstall", async () => {
|
|
const source = await readFile("scripts/artifact-publish.mjs", "utf8");
|
|
assert.match(source, /@oven\/bun-linux-x64@1\.3\.13/u);
|
|
assert.match(source, /@oven\/bun-linux-aarch64@1\.3\.13/u);
|
|
assert.match(source, /--ignore-scripts "\$bun_pkg"/u);
|
|
assert.match(source, /ln -sf "\/app\/node_modules\/\\\$\{bun_pkg%@\*\}\/bin\/bun" \/usr\/local\/bin\/bun/u);
|
|
assert.doesNotMatch(source, /npm install --no-save --omit=dev --include=optional --ignore-scripts bun@/u);
|
|
assert.match(source, /hwlab-artifact-runtime-check-failed:\$1/u);
|
|
assert.match(source, /fail bun-version/u);
|
|
});
|