Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow passing passWithNoTests, allowOnly inside config #1264

Merged
merged 1 commit into from May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/config/index.md
Expand Up @@ -455,6 +455,20 @@ export default {
}
```

### allowOnly

- **Type**: `boolean`
- **Default**: `false`

Allow tests and suites that are marked as only.

### passWithNoTests

- **Type**: `boolean`
- **Default**: `false`

Vitest will end the process with `0` exit code, if no tests will be found.

### logHeapUsage

- **Type**: `boolean`
Expand Down
20 changes: 10 additions & 10 deletions packages/vitest/src/types/config.ts
Expand Up @@ -298,6 +298,16 @@ export interface InlineConfig {
*/
resolveSnapshotPath?: (path: string, extension: string) => string

/**
* Pass with no tests
*/
passWithNoTests?: boolean

/**
* Allow tests and suites that are marked as only
*/
allowOnly?: boolean

/**
* Show heap usage after each test. Usefull for debugging memory leaks.
*/
Expand All @@ -321,16 +331,6 @@ export interface UserConfig extends InlineConfig {
*/
dom?: boolean

/**
* Pass with no tests
*/
passWithNoTests?: boolean

/**
* Allow tests and suites that are marked as only
*/
allowOnly?: boolean

/**
* Run tests that cover a list of source files
*/
Expand Down