Skip to content

Commit 86266e4

Browse files
committed
test: don't serialize components
1 parent 0eed83c commit 86266e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/index.test.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ describe("Serializer test function", () => {
3434
expect(shouldSerialize).toEqual(false);
3535
});
3636

37+
it("return false when given a React component", () => {
38+
const Component = (): React.ReactElement => (
39+
<div>
40+
<span>Test Component</span>
41+
</div>
42+
);
43+
const shouldSerialize = serializer.test(<Component />);
44+
45+
expect(shouldSerialize).toEqual(false);
46+
});
47+
3748
it("returns false if value is undefined", () => {
3849
const shouldSerialize = serializer.test(undefined);
3950

0 commit comments

Comments
 (0)