Skip to content

Commit 2c85613

Browse files
authored
added tests for Button, Divider, Grid, Loading and Table (#28)
1 parent 500df1b commit 2c85613

File tree

5 files changed

+51
-0
lines changed

5 files changed

+51
-0
lines changed

Diff for: tests/spec/Button.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { render } from "react-testing-library";
3+
import { Button } from "../../src/index";
4+
5+
describe("Button", () => {
6+
test("renders without crashing", () => {
7+
render(<Button />);
8+
});
9+
});

Diff for: tests/spec/Divider.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { render } from "react-testing-library";
3+
import { Divider } from "../../src/index";
4+
5+
describe("Divider", () => {
6+
test("renders without crashing", () => {
7+
render(<Divider />);
8+
});
9+
});

Diff for: tests/spec/Grid.test.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from "react";
2+
import { render } from "react-testing-library";
3+
import { Grid } from "../../src/index";
4+
5+
describe("Grid", () => {
6+
test("renders without crashing", () => {
7+
render(<Grid />);
8+
});
9+
10+
describe("Column", () => {
11+
test("renders without crashing", () => {
12+
render(<Grid.Column width="4" />);
13+
});
14+
});
15+
});

Diff for: tests/spec/Loading.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { render } from "react-testing-library";
3+
import { Loading } from "../../src/index";
4+
5+
describe("Loading", () => {
6+
test("renders without crashing", () => {
7+
render(<Loading />);
8+
});
9+
});

Diff for: tests/spec/Table.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { render } from "react-testing-library";
3+
import { Table } from "../../src/index";
4+
5+
describe("Table", () => {
6+
test("renders without crashing", () => {
7+
render(<Table headings={["heading"]} />);
8+
});
9+
});

0 commit comments

Comments
 (0)