update createHash implementation and add tests

This commit is contained in:
Nystik
2026-05-16 15:07:26 +02:00
parent c225f73859
commit c1a169a3ed
5 changed files with 167 additions and 52 deletions

View File

@@ -17,7 +17,7 @@ describe("ContentCache size accounting", () => {
expect(cache.currentBytes).toBe(0);
});
it("replacing an entry reflects the new size, not old + new", () => {
it("replacing an entry reflects the new size", () => {
const cache = new ContentCache(1024);
cache.set("a.md", "short");
cache.set("a.md", "a much longer string");