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

vitest typecheck does not find test files in typecheck.include #4432

Closed
6 tasks done
unicornware opened this issue Nov 3, 2023 · 5 comments
Closed
6 tasks done

vitest typecheck does not find test files in typecheck.include #4432

unicornware opened this issue Nov 3, 2023 · 5 comments

Comments

@unicornware
Copy link

Describe the bug

Test files specified in typecheck.include are no longer found when running vitest typecheck --run.

This seems to be a regression of some sort, given that this is not an issue in previous versions (<=1.0.0-beta.2).

Reproduction

https://stackblitz.com/edit/vitest-typecheck-bug?file=vitest.config.ts

System Info

System:
    OS: macOS 13.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 47.54 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.8.0 - ~/.nvm/versions/node/v20.8.0/bin/node
    Yarn: 4.0.0 - ~/.yarn/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.8.0/bin/npm
  Browsers:
    Chrome: 118.0.5993.117
    Safari: 16.6
  npmPackages:
    @vitest/coverage-v8: 1.0.0-beta.3 => 1.0.0-beta.3 
    @vitest/expect: 1.0.0-beta.3 => 1.0.0-beta.3 
    vite: 5.0.0-beta.14 => 5.0.0-beta.14 
    vitest: 1.0.0-beta.3 => 1.0.0-beta.3

Used Package Manager

yarn

Validations

Copy link

stackblitz bot commented Nov 3, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

unicornware added a commit to flex-development/gh-commit that referenced this issue Nov 3, 2023
…ta.2

- vitest-dev/vitest#4432

Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
@sheremet-va
Copy link
Member

There is no such command anymore. Typechecking runs alongside normal tests now, but you need to pass down --typecheck

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
@unicornware
Copy link
Author

@sheremet-va

ok. is there a way to make this clear to users? given what you said, i would have expected vitest typecheck to give a different error. the current error makes this seems like a bug, rather than a need for users to review the docs / update their project setups.

@sheremet-va
Copy link
Member

sheremet-va commented Nov 3, 2023

This is mentioned in documentation. "typecheck" is a valid filter. I guess, we can throw an error until 2.0 if you think this is a valid concern 🤔

@unicornware
Copy link
Author

unicornware commented Nov 3, 2023

@sheremet-va

docs are great, but throwing an error would be more helpful - especially when running vitest during a ci workflow. all of my workflows that include typechecks passed even though my files were not found. throwing an error will cause the workflow, thus leading most developers to review the documentation, and make it clear that vitest typecheck is deprecated

edit: release notes wise, it would also be helpful if the vitest typecheck note was also in the "🚨 Breaking Changes" section

@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants