-
Notifications
You must be signed in to change notification settings - Fork 0
joellobo/jest-playground
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
## Jest ## http://jestjs.io/ git clone https://github.com/joellobo/jest-playground.git # 1 mkdir new-test cd new-test yarn --init yarn add --dev jest jest --init mkdir src cd src touch sum.js -- function sum(a, b) { return a + b; } module.exports = sum; -- cd .. mkdir "__tests__" cd "__tests__" touch sum.test.js -- const sum = require('../src/sum'); test('adds 1 + 2 to equal 3', () => { expect(sum(1, 2)).toBe(3); }); -- cd .. vim package.json "scripts": { "test": "jest" }, yarn test rm -R new-test/
About
Jest Playground
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published