Created
November 27, 2018 20:55
-
-
Save dextel2/f52885e8a7a5d77ce56a30d1b10c8417 to your computer and use it in GitHub Desktop.
A generic CI for GitLab CI, for ReactJS test cases, if you do not have separate client/server architecture you will not need 1st line of `script`,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:8.11.3 | |
test: | |
script: | |
- cd client && npm install | |
- CI=true npm test | |
only: | |
- master | |
# To manage things more clean you can create a folder inside src named `__tests__` and tests will work just fine | |
# File extension must be Filename.test.js | |
# Since JS is extension add `--env=jsdom` in test script in package.json | |
# Example : "test": "react-scripts test --env=jsdom" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment