From deaee41d614fae99eeecd6a66fae8b862f24f773 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 23 Nov 2021 11:18:26 +0200 Subject: [PATCH] cleanup variable names in tests Signed-off-by: Jari Kolehmainen --- src/common/__tests__/base-store.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/__tests__/base-store.test.ts b/src/common/__tests__/base-store.test.ts index 0888084af2..0a4f81e8f3 100644 --- a/src/common/__tests__/base-store.test.ts +++ b/src/common/__tests__/base-store.test.ts @@ -136,22 +136,22 @@ describe("BaseStore", () => { }); it("persists transaction only once", () => { - const jsonSpy = jest.spyOn(store, "saveToFile"); + const fileSpy = jest.spyOn(store, "saveToFile"); store.updateAll({ a: "foo", b: "bar", c: "hello", }); - expect(jsonSpy).toHaveBeenCalledTimes(1); + expect(fileSpy).toHaveBeenCalledTimes(1); }); it("persists changes one-by-one without transaction", () => { - const jsonSpy = jest.spyOn(store, "saveToFile"); + const fileSpy = jest.spyOn(store, "saveToFile"); store.a = "a"; store.b = "b"; - expect(jsonSpy).toHaveBeenCalledTimes(2); + expect(fileSpy).toHaveBeenCalledTimes(2); const data = JSON.parse(readFileSync("tmp/test-store.json").toString()); @@ -159,13 +159,13 @@ describe("BaseStore", () => { }); it("persists changes coming via onSync (sync from different process)", () => { - const jsonSpy = jest.spyOn(store, "saveToFile"); + const fileSpy = jest.spyOn(store, "saveToFile"); store.onSync({ a: "foo", b: "", c: "bar" }); expect(store.toJSON()).toEqual({ a: "foo", b: "", c: "bar" }); - expect(jsonSpy).toHaveBeenCalledTimes(1); + expect(fileSpy).toHaveBeenCalledTimes(1); }); }); });