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

file addition is not detected when using relative include #981

Closed
6 tasks done
sapphi-red opened this issue Mar 19, 2022 · 0 comments · Fixed by #1070
Closed
6 tasks done

file addition is not detected when using relative include #981

sapphi-red opened this issue Mar 19, 2022 · 0 comments · Fixed by #1070

Comments

@sapphi-red
Copy link
Contributor

sapphi-red commented Mar 19, 2022

Describe the bug

When a file is added the test reruns on watch mode.
But when include is relative like below, the rerun does not happen.

export default defineConfig({
  test: {
    include: ['test/**.test.ts'],
  },
});

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-b4spnq?file=vite.config.ts

  1. Run npm run test.
  2. Add foo.test.ts to test directory.
  3. test does not rerun.

The rerun happens if you change include to ['**/test/**.test.ts'].

System Info

stackblitz

vitest 0.7.4

Used Package Manager

npm

Validations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant