import { assert } from "chai"; import { NoopTemplateCache, TemplateCache } from "./template-cache.js"; it("should cache (in memory)", async () => { const cache = new TemplateCache(); await cache.set("foo-bar", "

Hello World

"); assert.equal(await cache.get("foo-bar"), "

Hello World

"); }); it("should never cache (noop)", async () => { const cache = new NoopTemplateCache(); await cache.set("foo-bar", "

Hello World

"); assert.equal(await cache.get("foo-bar"), undefined); });