You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "kinow (via GitHub)" <gi...@apache.org> on 2023/01/29 22:49:30 UTC

[GitHub] [jena] kinow commented on a diff in pull request #1734: Add start-server-and-test, remove concurrently, and simplify packages…

kinow commented on code in PR #1734:
URL: https://github.com/apache/jena/pull/1734#discussion_r1090068854


##########
jena-fuseki2/jena-fuseki-ui/package.json:
##########
@@ -7,15 +7,15 @@
   "license": "Apache-2.0",
   "scripts": {
     "dev": "vite",
-    "serve": "vite preview --port 8080",
+    "serve": "vite preview",
     "build": "vite build",
     "test:unit": "vitest run --environment jsdom",
-    "test:e2e": "bash -c 'concurrently --names \"SERVER,TESTS\" --prefix-colors \"yellow,blue\" --success \"first\" --kill-others \"yarn run serve:offline\" \"cross-env CYPRESS_COVERAGE=false cypress run ${0}\"'",
+    "test:e2e": "concurrently --names 'SERVER,CLIENT,TESTS' --prefix-colors 'yellow,blue,green' --success 'first' --kill-others 'yarn run serve:fuseki' 'yarn wait-on http://localhost:${FUSEKI_PORT}/ping && yarn run dev' 'yarn wait-on http-get://localhost:${PORT}/index.html && cypress run ${0}'",
     "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
-    "coverage:unit": "vitest run --environment jsdom --coverage",
-    "coverage:e2e": "bash -c 'concurrently --names \"SERVER,TESTS\" --prefix-colors \"yellow,blue\" --success \"first\" --kill-others \"yarn run serve:offline\" \"cross-env CYPRESS_COVERAGE=true cypress run ${0}\"'",
+    "coverage:unit": "yarn run test:unit -- --coverage",
+    "coverage:e2e": "cross-env-shell CYPRESS_COVERAGE=true yarn run test:e2e",
     "serve:fuseki": "nodemon src/services/mock/json-server.js",
-    "serve:offline": "concurrently --names 'SERVER,CLIENT' --prefix-colors 'yellow,blue' --success \"first\" --kill-others 'yarn run serve:fuseki' 'yarn run dev'"
+    "serve:offline": "cross-env FUSEKI_PORT=\"${FUSEKI_PORT:=3030}\" PORT=\"${PORT:=8080}\" concurrently --names 'SERVER,CLIENT' --prefix-colors 'yellow,blue' --success 'first' --kill-others 'yarn run serve:fuseki' 'yarn wait-on http://localhost:${FUSEKI_PORT}/ping && yarn run dev'"

Review Comment:
   I tried using `start-server-and-test`, but I was ending the command with `yarn run dev`. With this tool your last comment is a "test". Reverted to concurrently as that makes more sense. Had to adjust the script a little.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org