Skip to content

Commit

Permalink
feat: allow passing passWithNoTests, allowOnly inside config (#1264)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed May 8, 2022
1 parent 555aba6 commit dd3c5a1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
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

0 comments on commit dd3c5a1

Please sign in to comment.