diff --git a/package.json b/package.json index bfcf566b8..e41e11f27 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,11 @@ "dev:oidc": "npm run dev:oidcdeps && export CASS_OIDC_ENABLED=true|| set CASS_OIDC_ENABLED=true&& npm run dev:nodemon", "dev:nodemon": "nodemon --watch ../cass-npm --watch . --max-old-space-size=512 --ignore etc src/main/server.js", "dev:nodemon:docker": "nodemon --ignore etc --exec \"docker compose up -d --build\"", - "dev:nyc": "npm run dev:deps && nyc --reporter lcov node src/main/server.js", + "dev:nyc": "npm run dev:deps && export CASS_LOOPBACK=http://localhost:8080/api/|| set CASS_LOOPBACK=http://localhost:8080/api/&&export PORT=8080|| set PORT=8080&&nyc --reporter lcov node src/main/server.js", "mocha": "wait-on http://localhost/api/ping && mocha -b --timeout 15000 node_modules/cassproject/src/**/*.test.js src/**/*.test.js", "mochaEncryption": "wait-on http://localhost/api/ping && mocha -b --timeout 15000 node_modules/cassproject/src/com/eduworks/ec/crypto/*.test.js", "mochafast": "wait-on http://localhost/api/ping && mocha -b src/**/*.test.js", + "mochaNyc": "export CASS_LOOPBACK=http://localhost:8080/api/|| set CASS_LOOPBACK=http://localhost:8080/api/&&wait-on http://localhost:8080/api/ping && mocha -b --timeout 15000 node_modules/cassproject/src/**/*.test.js src/**/*.test.js", "nyc": "nyc --reporter lcov npm run mocha", "automocha": "nodemon --watch ../cass-npm --watch . --exec \"npm run mocha\"", "automochafast": "nodemon --exec \"npm run mochafast\"", @@ -37,7 +38,7 @@ "run:google": "pm2 start ./pm2.google.config.js", "run:proxy": "pm2 start ./pm2.proxy.config.js", "run:test": "pm2 start ./pm2.test.config.js", - "run:nyc": "concurrently --killOthers \"npm run dev:nyc\" \"npm run mocha\"", + "run:nyc": "concurrently --killOthers \"npm run dev:nyc\" \"npm run mochaNyc\"", "run:cassbase": "pm2 start ./pm2.cassbase.config.js", "run:withTests": "npm run test:start & npm run mochaEncryption", "pm2startup": "pm2 startup",