diff --git a/.circleci/config.yml b/.circleci/config.yml index 6eb27031..fe24dbd7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,11 +31,10 @@ jobs: -in google-auth.json.cipher \ -out google-auth.json \ -k $KEY - - run: mkdir ~/junit # run tests - run: name: Run Unitests - command: MOCHA_FILE=~/junit/test-results.xml ./node_modules/.bin/mocha test --recursive --reporter mocha-junit-reporter --exit + command: MOCHA_FILE=~/junit/test-results.xml npm test when: always - store_test_results: path: ~/junit diff --git a/.gitignore b/.gitignore index 2fb55062..c83d1ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,6 @@ config/env/production.js *.njsproj *.njsproj.* *.sln -/.vs \ No newline at end of file +/.vs + +test-results.xml \ No newline at end of file diff --git a/package.json b/package.json index 8bcae4a3..cf5fcf11 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "scripts": { "dev": "nodemon app.js", "start": "node app.js", - "test": "NODE_ENV=test swagger project test", + "test": "NODE_ENV=test mocha test --recursive --reporter mocha-junit-reporter --exit", "precommit": "lint-staged", "snyk-protect": "snyk protect", "prepare": "npm run snyk-protect"