Skip to content

Commit

Permalink
chore: use tap reporter by default for mocha and transform the result…
Browse files Browse the repository at this point in the history
… for codecov by tap-junit in test github action
  • Loading branch information
msudgh committed Dec 27, 2024
1 parent f6f4b82 commit 3da95f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- run: pnpm run test:coverage
- run: pnpm install -D tap-junit
- run: pnpm run test:coverage | tap-junit > coverage/junit.xml
- name: SonarQube Scan
if: matrix.os == 'ubuntu-latest'
uses: SonarSource/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"$schema": "https://json.schemastore.org/mocharc.json",
"require": "tsx",
"reporter": "mocha-junit-reporter",
"reporter-option": ["mochaFile=coverage/junit.xml"],
"reporter": "tap",
"timeout": 5000,
"forbidOnly": true,
"watch-files": ["src"],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "pnpm run lint",
"prepack": "oclif manifest && pnpm run build:release && pnpm run test:unit",
"test:unit": "mocha -R=spec",
"test:unit": "mocha",
"test:coverage": "nyc mocha",
"prepare": "husky"
},
Expand Down
1 change: 0 additions & 1 deletion src/services/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ describe('Command: run', () => {

it('should echo path and name of vault by echo command and reserved placeholder {0} {1} and not {10000}', async () => {
const { vault, config } = setupVault()

const vaults = await loadVaults(vault.path)
const selectedVaults = await vaultsSelector(vaults)
const result = await commandVaultIterator(
Expand Down

0 comments on commit 3da95f7

Please sign in to comment.