This project was bootstrapped with Create React App.
This project's only purpose is to demonstrate testing a React project. The actuall App itself does nothing useful.
NOTE Runs in watch mode (it will rerun tests every time you save a source file)
docker build -f containers/Dockerfile -t react-app-with-enzyme:latest containers
docker run -it -v `pwd`:/code react-app-with-enzyme:latest bash -c 'yarn test'
To emulate running in a CI environment run the test:ci
target (adds junit output and cobertura coverage)
./jenkins_start_integration_test_env.sh
./run_tests.sh
NOTE Requires Jenkins to have the cobertura plugin
- Create new job of type "Pipeline"
- Check "Do not allow concurrent builds"
- Check "Do not allow the pipeline to resume if the master restarts"
- GitHub project
- Put GitHub Home Page "https://github.com/timharsch/react-app-with-enzyme/"
- Put the contents of "jenkinsfile" in for the Pipeline Script
- Click "Save"
- Click "Build Now"