Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

test(ci): verify resolved cache inputs instead of glob spelling

morluto70c238e376af
diff --git a/tests/boundary/filesystem/ciCachePolicy.test.ts b/tests/boundary/filesystem/ciCachePolicy.test.ts
index 47e4f86dc..4dea36ae5 100644
--- a/tests/boundary/filesystem/ciCachePolicy.test.ts
+++ b/tests/boundary/filesystem/ciCachePolicy.test.ts
@@ -226,10 +226,6 @@ it("bounds the rolling static snapshot with Turbo age and size eviction", async
.object({
cacheMaxAge: z.string(),
cacheMaxSize: z.string(),
- tasks: z.record(
- z.string(),
- z.object({ inputs: z.array(z.unknown()).optional() }),
- ),
})
.parse(JSON.parse(await readFile(join(repository, "turbo.json"), "utf8")));
// The static job restores the previous snapshot by prefix and saves the
@@ -248,5 +244,4 @@ it("bounds the rolling static snapshot with Turbo age and size eviction", async
unit === "TB" ? value * 1024 * 1024 : unit === "GB" ? value * 1024 : value;
expect(megabytes).toBeGreaterThan(0);
expect(megabytes).toBeLessThanOrEqual(1024);
- expect(turbo.tasks["knip"]?.inputs).toContain("vitest.config.ts");
});
diff --git a/tests/boundary/filesystem/staticCheckReports.test.ts b/tests/boundary/filesystem/staticCheckReports.test.ts
index 7d022da72..10ef06674 100644
--- a/tests/boundary/filesystem/staticCheckReports.test.ts
+++ b/tests/boundary/filesystem/staticCheckReports.test.ts
@@ -49,7 +49,7 @@ const lintDiagnostics = async (root: string) =>
),
).diagnostics;
-it("includes every actually linted file in both cached lint task inputs", () => {
+it("covers the lint inventory and root tool configs in resolved cache inputs", () => {
const scan = spawnSync(
process.execPath,
[join(repository, "node_modules/oxlint/bin/oxlint"), "--debug=files"],
@@ -69,6 +69,7 @@ it("includes every actually linted file in both cached lint task inputs", () =>
"run",
"lint",
"lint:built",
+ "knip",
"--dry=json",
],
{
@@ -99,6 +100,14 @@ it("includes every actually linted file in both cached lint task inputs", () =>
files.filter((file) => !Object.hasOwn(task.inputs, file)),
`${task.task} omits actual checker inputs`,
).toEqual([]);
+ const knip = tasks.find(({ task }) => task === "knip");
+ expect(knip).toBeDefined();
+ expect(
+ files.filter(
+ (file) => !file.includes("/") && !Object.hasOwn(knip!.inputs, file),
+ ),
+ "knip omits root tool configuration inputs",
+ ).toEqual([]);
});
it("summarizes warnings without losing their complete diagnostic records", async () => {