Skip to content

Commit

Permalink
feat(cli): add the files only option to the list command (unfuncitonal)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ma-hawaj committed Aug 25, 2024
1 parent 95f0203 commit 8d3ff56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/vitest/src/node/cli/cli-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export interface CliOptions extends UserConfig {
* Output collected tests as JSON or to a file
*/
json?: string | boolean
/**
* Output collected test files only
*/
filesOnly?: boolean
}

/**
Expand Down
6 changes: 5 additions & 1 deletion packages/vitest/src/node/cli/cli-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ export const cliOptionsConfig: VitestCLIOptions = {
outputJson: null,
json: null,
provide: null,
filesOnly: null,
}

export const benchCliOptionsConfig: Pick<
Expand All @@ -813,10 +814,13 @@ export const benchCliOptionsConfig: Pick<

export const collectCliOptionsConfig: Pick<
VitestCLIOptions,
'json'
'json' | 'filesOnly'
> = {
json: {
description: 'Print collected tests as JSON or write to a file (Default: false)',
argument: '[true/path]',
},
filesOnly: {
description: 'Print only test files with out the test cases',
}
}

0 comments on commit 8d3ff56

Please sign in to comment.