Skip to content

Commit f0f6b70

Browse files
Introduce __test__ directory and implement first basic test
This commit adds the separate __test__ directory which will keep all tests of the whole library. This is to make sure, that when later publishing sources to npm, tests won't be part of the deliveries. The first test added or the StepNumber component is the most basic, because: * this component is rather simple (for now) * this is to make sure, in this commit, that tests work without hiccups.
1 parent 062ce88 commit f0f6b70

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from "react";
2+
import { render } from "@testing-library/react-native";
3+
import { StepNumber } from "../../src/components/StepNumber"
4+
5+
describe("StepNumber", () => {
6+
it("Displays number of step according to given index", () => {
7+
const {getByText} = render(<StepNumber i={0} style={undefined} />);
8+
expect(getByText("0")).toBeDefined();
9+
});
10+
});

0 commit comments

Comments
 (0)