| ... | @@ -1,19 +1,11 @@ | ... | @@ -1,19 +1,11 @@ |
| 1 | import { describe, expect, it } from "vite-plus/test"; | 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | | 2 | |
| 3 | import { | 3 | import { projectFileCacheKey, projectFileEditorCacheKey } from "./fileContentRevision"; |
| 4 | fileContentRevision, | | |
| 5 | projectFileCacheKey, | | |
| 6 | projectFileEditorCacheKey, | | |
| 7 | } from "./fileContentRevision"; | | |
| 8 | | 4 | |
| 9 | describe("fileContentRevision", () => { | 5 | describe("file cache identity", () => { |
| 10 | it("changes for same-length edits", () => { | 6 | it("changes for same-length edits", () => { |
| 11 | expect(fileContentRevision("nodeVersion")).not.toBe(fileContentRevision("nodeVeasdrs")); | 7 | expect(projectFileCacheKey("/repo", "file.json", "nodeVersion")).not.toBe( |
| 12 | }); | 8 | projectFileCacheKey("/repo", "file.json", "nodeVeasdrs"), |
| 13 | | | |
| 14 | it("keeps identical contents stable", () => { | | |
| 15 | expect(projectFileCacheKey("/repo", "file.json", "contents")).toBe( | | |
| 16 | projectFileCacheKey("/repo", "file.json", "contents"), | | |
| 17 | ); | 9 | ); |
| 18 | }); | 10 | }); |
| 19 | | 11 | |