diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-04-15 19:35:15 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-05-02 12:55:42 +0900 |
commit | b0fe06bc2e739cc252a559f666da65b27769959d (patch) | |
tree | 4fe9d1c6378b87082b14ca6d1b7ca2737df94aac /test/background/infrastructures/MemoryStorage.test.ts | |
parent | 20d40d8017284f80876bde8e28cbde47c3651886 (diff) |
Fix types in tests
Diffstat (limited to 'test/background/infrastructures/MemoryStorage.test.ts')
-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", () => { |