Add jest for unit tests
This commit is contained in:
12
tests/App.test.js
Normal file
12
tests/App.test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from "react";
|
||||
import renderer from "react-test-renderer";
|
||||
|
||||
import App from "./App";
|
||||
|
||||
|
||||
describe("<App />", () => {
|
||||
it("has 1 child", () => {
|
||||
const tree = renderer.create(<App />).toJSON();
|
||||
expect(tree.children.length).toBe(1);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user