diff options
Diffstat (limited to 'test/background/infrastructures')
-rw-r--r-- | test/background/infrastructures/MemoryStorage.test.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/background/infrastructures/MemoryStorage.test.ts b/test/background/infrastructures/MemoryStorage.test.ts index 5f8be2a..1c67b18 100644 --- a/test/background/infrastructures/MemoryStorage.test.ts +++ b/test/background/infrastructures/MemoryStorage.test.ts @@ -1,4 +1,5 @@ -import MemoryStorage from "background/infrastructures/MemoryStorage"; +import MemoryStorage from "../../../src/background/infrastructures/MemoryStorage"; +import { expect } from "chai"; describe("background/infrastructures/memory-storage", () => { it("stores values", () => { @@ -29,12 +30,12 @@ describe("background/infrastructures/memory-storage", () => { it("stored cloned objects", () => { const cache = new MemoryStorage(); - const recipe = { sugar: "300g" }; + const recipe = { sugar: "300g", salt: "10g" }; cache.set("recipe", recipe); recipe.salt = "20g"; - const got = cache.get("recipe", recipe); - expect(got).to.deep.equal({ sugar: "300g" }); + const got = cache.get("recipe"); + expect(got).to.deep.equal({ sugar: "300g", salt: "10g" }); }); it("throws an error with unserializable objects", () => { |