Skip to content

Commit

Permalink
fix: fix missed defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Aug 8, 2024
1 parent 382cf0e commit b36c125
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-flies-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/vitest-coverage-reporter": patch
---

add `default` value for json-summary-path, json-final-path
2 changes: 1 addition & 1 deletion bin/generate-badges.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

import { main } from '../dist/index.js';
import { main } from '../dist/main.js';

main(process.argv.slice(2));
7 changes: 4 additions & 3 deletions src/inputs/readOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ export async function readOptions() {
// Working directory can be used to modify all default/provided paths (for monorepos, etc)
const workingDirectory = core.getInput('working-directory');

const fileCoverageModeRaw = core.getInput('file-coverage-mode'); // all/changes/none
// all/changes/none
const fileCoverageModeRaw = core.getInput('file-coverage-mode');
const fileCoverageMode = getCoverageModeFrom(fileCoverageModeRaw);

const jsonSummaryPath = path.resolve(
workingDirectory,
core.getInput('json-summary-path')
core.getInput('json-summary-path') || 'coverage/coverage-summary.json'
);
const jsonFinalPath = path.resolve(
workingDirectory,
core.getInput('json-final-path')
core.getInput('json-final-path') || 'coverage/coverage-final.json'
);

const jsonSummaryCompareInput = core.getInput('json-summary-compare-path');
Expand Down

0 comments on commit b36c125

Please sign in to comment.