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: show more details when no test files found #1033
Conversation
✅ Deploy Preview for vitest-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
packages/vitest/src/node/core.ts
Outdated
if (this.config.passWithNoTests) | ||
this.log('No test files found\n') | ||
const exitCode = this.config.passWithNoTests ? 0 : 1 | ||
if (this.config.passWithNoTests) { this.log(`No test files found, existing code with ${exitCode}\n`) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.config.passWithNoTests) { this.log(`No test files found, existing code with ${exitCode}\n`) } | |
if (this.config.passWithNoTests) { this.log(`No test files found, exiting code with ${exitCode}\n`) } |
docs/config/index.md
Outdated
- **Type** `string | RegExp` | ||
|
||
Run tests with full names matching the pattern. | ||
If you add `do not run` to this property, tests containing the word `do not run` in the test name will be skipped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the opposite will happen? Only tests containing "do not run" will run, no?
packages/vitest/src/utils/base.ts
Outdated
* joinArrayItems | ||
* convert Array<T> to a single string to display in stdout | ||
*/ | ||
export function joinArrayItems(items: unknown[]): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just out of interest, what is the difference between just calling .join
? I see all test cases will return the same if called with .join
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed to use join
since include
and watchIgnore
are absolutely the array. Thanks.
#1032
Enable vitest to show
when no test files found.