Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit b7cb341

Browse files
committed
added tests
1 parent 44d5868 commit b7cb341

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`renders correctly 1`] = `
4+
<View
5+
style={
6+
Array [
7+
Object {
8+
"backgroundColor": "green",
9+
"height": 20,
10+
"width": 30,
11+
},
12+
Object {
13+
"margin": 24,
14+
"padding": 24,
15+
},
16+
]
17+
}
18+
/>
19+
`;

__tests__/index.snapshot.test.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from "react";
2+
import renderer from "react-test-renderer";
3+
import BlankSpacer from "../src/index";
4+
5+
it("renders correctly", () => {
6+
const tree = renderer
7+
.create(
8+
<BlankSpacer
9+
height={20}
10+
width={30}
11+
color={"green"}
12+
style={{ margin: 24, padding: 24 }}
13+
/>
14+
)
15+
.toJSON();
16+
expect(tree).toMatchSnapshot();
17+
});

0 commit comments

Comments
 (0)