Testing a single "unit" of a program, with as little dependencies involved as possible.
yarn add --dev jest
npm i -D jest
Layout and setup all variables and mocks required to run the test.
Run the unit you are trying to test
Make sure that you get the result you were looking for! Jest and other test runners have built in assertions.
Add a script to package.json
like so
Github | |
---|---|
@zealigan | @ericadamski |