Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/__tests__/Squawk.update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,23 @@
prop2: "updated2"
});
});

it("ignores invalid update values", () => {
const store = createStore({
prop1: "initial1",
prop2: "initial2"
});

store.update(null as any);

Check warning on line 38 in src/__tests__/Squawk.update.test.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
expect(store.get()).toEqual({
prop1: "initial1",
prop2: "initial2"
});

store.update("string" as any);

Check warning on line 44 in src/__tests__/Squawk.update.test.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
expect(store.get()).toEqual({
prop1: "initial1",
prop2: "initial2"
});
});
});
Loading