yarn add --dev jest
add 'jest' to .eslintrc.json
"env": {
"browser": true,
"jest": true
},
mkdir src/__test__
create index.test.js under this folder
test("number", () => {
expect(1).toBe(1);
});
add following code in npm script
"test": "jest"
run yarn test