Fix base store tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-12-06 09:18:59 -05:00
1 parent 570d252950
commit 9dbc6bc293
1 file changed
+3 -3
+3 -3
View File
@@ -115,7 +115,7 @@ describe("BaseStore", () => {
const data = JSON.parse(readFileSync("some-user-data-directory/test-store.json").toString());
expect(data).toEqual({ a: "foo", b: "bar", c: "hello" });
expect(data).toMatchObject({ a: "foo", b: "bar", c: "hello" });
});
it("persists transaction only once", () => {
@@ -138,7 +138,7 @@ describe("BaseStore", () => {
const data = JSON.parse(readFileSync("some-user-data-directory/test-store.json").toString());
expect(data).toEqual({ a: "a", b: "b", c: "" });
expect(data).toMatchObject({ a: "a", b: "b", c: "" });
});
it("persists changes coming via onSync (sync from different process)", () => {
@@ -146,7 +146,7 @@ describe("BaseStore", () => {
store.onSync({ a: "foo", b: "", c: "bar" });
expect(store.toJSON()).toEqual({ a: "foo", b: "", c: "bar" });
expect(store.toJSON()).toMatchObject({ a: "foo", b: "", c: "bar" });
expect(fileSpy).toHaveBeenCalledTimes(1);
});