Skip to content

Commit c62b90c

Browse files
chore: specify MongoDB conn string in action:coverage
This makes sure we explicitly specify the MongoDB connection string in `action:coverage` to address an issue I observed in CI for the action would sometimes fail to connect. It also modifies the `action:coverage` command to delegate to the `test` command, so that any future updates to how tests are run is automatically picked up by the coverage checker. Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
1 parent 6476a3b commit c62b90c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
},
7878
"scripts": {
7979
"action:test": "node node_modules/mocha/bin/mocha test/unit-tests --recursive --exit",
80-
"action:coverage": "NODE_ENV=test node node_modules/nyc/bin/nyc.js --lines=80 node_modules/mocha/bin/mocha.js src/* --recursive --exit",
80+
"action:coverage": "NODE_ENV=test MONGO_CONN_STRING=mongodb://localhost:27017 MONGO_DB_NAME=cve_test node node_modules/nyc/bin/nyc.js --lines=80 npm run test",
8181
"action:lint-src": "node node_modules/eslint/bin/eslint.js src/",
8282
"action:lint-test": "node node_modules/eslint/bin/eslint.js test/",
8383
"action:lint-test-utils": "node node_modules/eslint/bin/eslint.js test-utils/",

0 commit comments

Comments
 (0)