Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

fileContentRevision.test.ts

15 lines523 Bytes

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