Skip to content

Commit f598b20

Browse files
committed
ci: 💚 mocha json reporter script added
1 parent 9a4baf8 commit f598b20

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
uses: dorny/test-reporter@v1
1818
if: success() || failure() # run this step even if previous step failed
1919
with:
20-
name: Mocha Tests # Name of the check run which will be created
21-
path: mochawesome-report/mochawesome.json # Path to test results
20+
name: Mocha Tests # Name of the check run which will be created
21+
path: report.json # Path to test results
2222
reporter: mocha-json # Format of test results

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"test": "npm run test:api && npm run test:unit",
3333
"test:api": "BABEL_ENV=test nyc --reporter=html --reporter=text mocha --require @babel/register ./test/test.js -t 30000 --reporter mochawesome --require babel-polyfill",
3434
"test:unit": "BABEL_ENV=test nyc --reporter=html --reporter=text mocha --require @babel/register ./test/unit/index.js -t 30000 --reporter mochawesome --require babel-polyfill",
35+
"test:unit:report:json": "BABEL_ENV=test nyc --reporter=html --reporter=text mocha --require @babel/register ./test/unit/index.js -t 30000 --reporter json --reporter-options output=report.json --require babel-polyfill",
3536
"test:typescript": "jest --testPathPattern=test/typescript --config ./jest.config.js --coverage",
3637
"test:debug": "BABEL_ENV=test mocha debug --require @babel/register ./test",
3738
"lint": "eslint lib test",

0 commit comments

Comments
 (0)