[Log] Jest: Getting Started
Official reference
Create a project directory.
npm init -y
npm i -D jest
touch index.js
touch calc.js
Write code.
function add(a, b) {
return a + b
}
module.exports = add
Make test directory.
mkdir test
touch test/calc.test.js
Write test code...
kaisei.hashnode.dev1 min read