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

Make --typecheck flag target only currently included test file #6648

Closed
4 tasks done
U-4-E-A opened this issue Oct 6, 2024 · 2 comments
Closed
4 tasks done

Make --typecheck flag target only currently included test file #6648

U-4-E-A opened this issue Oct 6, 2024 · 2 comments

Comments

@U-4-E-A
Copy link

U-4-E-A commented Oct 6, 2024

Clear and concise description of the problem

Currently the --typecheck appears to include all files from tsconfig.json rather than only the currently includes test files from vitest.config.ts: -

import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    include: ['./__tests__/*test.live.*']
  }
})

Suggested solution

When the --typecheck flag is set, have vitest interrogate vitest.config.ts to see which files are currently included and type only those.

Alternative

No response

Additional context

No response

Validations

@AriPerkkio
Copy link
Member

Does --typecheck.include work as expected here?

https://vitest.dev/config/#typecheck-include

Copy link

github-actions bot commented Oct 7, 2024

Hello @U-4-E-A. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2024
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

3 participants