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: show more details when no test files found #1033

Merged
merged 7 commits into from Apr 2, 2022

Conversation

togami2864
Copy link
Contributor

@togami2864 togami2864 commented Mar 26, 2022

#1032
Enable vitest to show

  • include
  • watchIgnore

when no test files found.
screen shot

@netlify
Copy link

netlify bot commented Mar 26, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 5f29639
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/6248385d53e3b70008345b6d
😎 Deploy Preview https://deploy-preview-1033--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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`) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`) }

- **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.
Copy link
Member

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?

* joinArrayItems
* convert Array<T> to a single string to display in stdout
*/
export function joinArrayItems(items: unknown[]): string {
Copy link
Member

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

Copy link
Contributor Author

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.

@sheremet-va sheremet-va merged commit 190b1c1 into vitest-dev:main Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants