project with examples on how to create unit test for React components.
go into folder project and run
docker build -t react-example .
docker run --rm -p 8080:8080 -v $(pwd):/workspace react-example
Tests are configured to run with karma and Headless Chrome.
docker run --rm -p 8080:8080 -v $(pwd):/workspace react-example npm test
nodejs and npm is required
npm start
Running the chrome binary might fail on some systems. That's why is recommended to use the docker image.
npm test