summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2017-05-15 22:59:12 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2017-05-15 22:59:12 +0200
commit7ddedbe3317c5d1947e881a270092324c271bdab (patch)
tree04a850af073a25aa6a9e119b53112f4261d79d15
parentAdd tests for lobby and game fields in Player (diff)
downloadseven-wonders-7ddedbe3317c5d1947e881a270092324c271bdab.tar.gz
seven-wonders-7ddedbe3317c5d1947e881a270092324c271bdab.tar.bz2
seven-wonders-7ddedbe3317c5d1947e881a270092324c271bdab.zip
Remove frontend test watch for gradle build
The CI environment variable is the only to launch the frontend tests in non-interactive mode. This variable was already properly set on CI and heroku, but when running local gradle builds, the watch was still a problem, hence this new script for one-shot tests in package.json.
-rw-r--r--frontend/build.gradle4
-rw-r--r--frontend/package.json1
2 files changed, 3 insertions, 2 deletions
diff --git a/frontend/build.gradle b/frontend/build.gradle
index b5068c0a..f69adac9 100644
--- a/frontend/build.gradle
+++ b/frontend/build.gradle
@@ -25,9 +25,9 @@ task start(type: YarnTask) {
}
task test(type: YarnTask) {
- args = ['test']
+ args = ['test:oneshot']
}
check.dependsOn(test)
bundle.dependsOn(yarn_install)
-assemble.dependsOn(bundle) \ No newline at end of file
+assemble.dependsOn(bundle)
diff --git a/frontend/package.json b/frontend/package.json
index 57e7e295..da3260e8 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -28,6 +28,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
+ "test:oneshot": "set CI=true && react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"eslintConfig": {
bgstack15