Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/watson28/react-testing-example
Project to demostrate how to test React components
https://github.com/watson28/react-testing-example
javascript karma mochajs reactjs
Last synced: 11 days ago
JSON representation
Project to demostrate how to test React components
- Host: GitHub
- URL: https://github.com/watson28/react-testing-example
- Owner: watson28
- License: mit
- Created: 2017-07-26T20:44:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-22T00:31:44.000Z (almost 7 years ago)
- Last Synced: 2024-10-18T01:13:20.816Z (about 1 month ago)
- Topics: javascript, karma, mochajs, reactjs
- Language: JavaScript
- Size: 1.14 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Testing Examples
project with examples on how to create unit test for React components.## Uses with Docker
### installation
go into folder project and run```
docker build -t react-example .
```### Running application
```
docker run --rm -p 8080:8080 -v $(pwd):/workspace react-example
```### Running tests
Tests are configured to run with karma and Headless Chrome.
```
docker run --rm -p 8080:8080 -v $(pwd):/workspace react-example npm test
```## Uses without Docker
### installation
nodejs and npm is required### Running application
```
npm start
```### Running tests
Running the chrome binary might fail on some systems. That's why is recommended to use the docker image.
```
npm test
```