aboutsummaryrefslogtreecommitdiff
path: root/test/background/infrastructures
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-04-15 19:35:15 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2020-05-02 12:55:42 +0900
commitb0fe06bc2e739cc252a559f666da65b27769959d (patch)
tree4fe9d1c6378b87082b14ca6d1b7ca2737df94aac /test/background/infrastructures
parent20d40d8017284f80876bde8e28cbde47c3651886 (diff)
Fix types in tests
Diffstat (limited to 'test/background/infrastructures')
-rw-r--r--test/background/infrastructures/MemoryStorage.test.ts9
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", () => {