This challenge was created to help you practicing with some testing exercises.
- Download this repo and install its dependecies (npm install)
- Run
yarn start
to build the project - All the code you need to test is in one single file
index.js
- To run the tests use the command
yarn test
oryarn test:watch
- Run
yarn test:coverage
to generate the coverage report
- Import the function you want to test from the
index.spect.ts
file, eg: import { isInteger } from './index'; - Some of the functions return an error or can have additional validations, make sure to test those scenarios
- All the exported functions need to be tested
- Try to get at least 80% of test coverage
- Feel free to install additional libraries if needed. Eg. jest-in-case
- The function
getStarWarsPlanets
should work even without internet connection