Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/scripts/check-changed.test.ts?version=157&format=json
40 linesspeed 83% · codex-capacity-chair 18%Last change codex-capacity-chair in version 157, 2 versions changed it

You're reading version 157. The newest is 318, and no version since then changed this file. Go to the newestCompare with 318

1// check:changed's plan: what a change reaches, on this repo as it is.
2
3import assert from "node:assert/strict";
4import { test } from "node:test";
5// @ts-expect-error: a plain .mjs script, no types
6import { plan } from "./check-changed.mjs";
7
8test("a changed source file brings in the test files that import it, through other files, and the typecheck", () => {
9 const p = plan(["src/engine/text.ts"]);
10 assert.equal(p.full, undefined);
11 const files: string[] = p.tests[0].files;
12 assert.ok(files.length > 0);
13 assert.ok(files.every((f) => f.endsWith(".test.ts")));
14 assert.ok(!files.includes("scripts/check-changed.test.ts"), "a test that doesn't reach the file stays out");
15 assert.deepEqual(
16 p.typechecks.map((c: { tsconfig: string }) => c.tsconfig),
17 ["tsconfig.json", "server/tsconfig.json"],
18 );
19 assert.deepEqual(p.lint, ["src/engine/text.ts"]);
20});
22test("a changed test file runs itself", () => {
23 const p = plan(["scripts/check-changed.test.ts"]);
24 assert.deepEqual(
25 p.tests.map((t: { files: string[] }) => t.files),
26 [["scripts/check-changed.test.ts"]],
27 );
28 assert.deepEqual(p.typechecks, [], "tsconfig.json doesn't include scripts/");
29});
31test("a change to setup runs the full check", () => {
32 assert.deepEqual(plan(["src/engine/text.ts", "package.json"]).full, ["package.json"]);
33 assert.deepEqual(plan(["tsconfig.json"]).full, ["tsconfig.json"]);
34});
36test("server changes include their tests and worker types", () => {
37 const p = plan(["server/src/engine-project.ts"]);
38 assert.ok(p.tests.flatMap((t: { files: string[] }) => t.files).includes("server/test/engine-project.test.ts"));
39 assert.ok(p.typechecks.some((c: { tsconfig: string }) => c.tsconfig === "server/tsconfig.json"));
40});