test: stabilize bun cache invalidation fixtures

This commit is contained in:
Josh Lehman
2026-03-02 13:54:34 -08:00
committed by Peter Steinberger
parent 175c770171
commit 21a1db78b3
2 changed files with 5 additions and 5 deletions

View File

@@ -439,10 +439,10 @@ describe("pairing store", () => {
stateDir,
channel: "telegram",
accountId: "yy",
allowFrom: ["1002"],
allowFrom: ["10022"],
});
const third = await readChannelAllowFromStore("telegram", process.env, "yy");
expect(third).toEqual(["1002"]);
expect(third).toEqual(["10022"]);
expect(readSpy).toHaveBeenCalledTimes(2);
readSpy.mockRestore();
});
@@ -468,10 +468,10 @@ describe("pairing store", () => {
stateDir,
channel: "telegram",
accountId: "yy",
allowFrom: ["1002"],
allowFrom: ["10022"],
});
const third = readChannelAllowFromStoreSync("telegram", process.env, "yy");
expect(third).toEqual(["1002"]);
expect(third).toEqual(["10022"]);
expect(readSpy).toHaveBeenCalledTimes(2);
readSpy.mockRestore();
});

View File

@@ -358,7 +358,7 @@ describe("scanDirectoryWithSummary", () => {
expect(second.critical).toBe(first.critical);
expect(readSpy).toHaveBeenCalledTimes(1);
await fs.writeFile(filePath, `const x = eval("2+2");`, "utf-8");
await fs.writeFile(filePath, `const x = eval("2+2");\n// cache bust`, "utf-8");
const third = await scanDirectoryWithSummary(root);
expect(third.critical).toBeGreaterThan(0);