AkurAI Build
Menu

popagent

public

Latest change d55058a6f163a78c89de066b0193f89954cdfc75 - Exclude autonomous runtime checkouts from verification by Ólafur Búi Ólafsson

import { describe, expect, test } from "bun:test";

const root = new URL("..", import.meta.url).pathname;

describe("deploy.sh", () => {
  test("is valid Bash and passes the built-in publication privacy scan", async () => {
    const syntax = Bun.spawnSync(["bash", "-n", "deploy.sh"], { cwd: root });
    expect(syntax.exitCode).toBe(0);

    const privacy = Bun.spawnSync(["bash", "deploy.sh", "privacy-check"], { cwd: root });
    expect(privacy.exitCode).toBe(0);
  });

  test("ignores managed runtime checkouts during verification", async () => {
    const bunfig = await Bun.file(new URL("../bunfig.toml", import.meta.url)).text();
    const tsconfig = JSON.parse(await Bun.file(new URL("../tsconfig.json", import.meta.url)).text());
    expect(bunfig).toContain('"data/self-update/**"');
    expect(tsconfig).toHaveProperty("exclude");
    if (!("exclude" in tsconfig) || !Array.isArray(tsconfig.exclude)) throw new TypeError("tsconfig exclude must be an array");
    expect(tsconfig.exclude).toContain("data/self-update/**");
  });
});