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 doesn't ignore webstorm / vscode folders #442

Closed
6 tasks done
davidmeirlevy opened this issue Jan 4, 2022 · 9 comments · Fixed by #606
Closed
6 tasks done

Vitest doesn't ignore webstorm / vscode folders #442

davidmeirlevy opened this issue Jan 4, 2022 · 9 comments · Fixed by #606

Comments

@davidmeirlevy
Copy link

Describe the bug

The runner doesn't ignore the .idea folder.

The defalt value mentioned by the documentation (['/node_modules/', '/dist/']) is wrong. if I'm setting this value - the runner crashes after the first run.

Reproduction

The defalt value mentioned by the documentation (['/node_modules/', '/dist/']) is wrong. if I'm setting this value - the runner crashes after the first run.

System Info

System:
    OS: macOS 12.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 316.45 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 7.13.0 - ~/.nvm/versions/node/v14.17.0/bin/npm
    Watchman: 2021.10.18.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 96.0.4664.110
    Firefox: 57.0.4
    Safari: 15.2
  npmPackages:
    @vitejs/plugin-vue: ^2.0.0 => 2.0.1 
    vite: ^2.7.2 => 2.7.10 
    vitest: ^0.0.131 => 0.0.131

Used Package Manager

npm

Validations

@antfu
Copy link
Member

antfu commented Jan 4, 2022

What file under .idea caused the crash? Can you provide more info?

@davidmeirlevy
Copy link
Author

Workspaces.xml

@DerYeger
Copy link
Member

DerYeger commented Jan 5, 2022

Could you post a log of the crash?

I'm using Vitest and Webstorm together without any issues.

@davidmeirlevy
Copy link
Author

it's not crashing, it's just re-run the tests when my workspace.xml is changing (which is happening every time webstorm is calculating everything..)

image

@antfu
Copy link
Member

antfu commented Jan 5, 2022

I will need a minimal reproduction repo.

@davidmeirlevy
Copy link
Author

https://github.com/davidmeirlevy/demo-vue-vitest

Run it on Webstorm in order to create the .idea folder.

@sheremet-va
Copy link
Member

sheremet-va commented Jan 7, 2022

The defalt value mentioned by the documentation (['/node_modules/', '/dist/']) is wrong. if I'm setting this value - the runner crashes after the first run.

I guess the docs are wrong, since default value is this right now:

[
  '**/node_modules/**', 
  '**/dist/**', 
  '**/cypress/**', 
  '**/.{idea,git,cache,output,temp}/**'
]

But it's true for exclude watch!

@davidmeirlevy
Copy link
Author

@sheremet-va i think that the best approach is to ignore everything that is mentioned at the gitignore file.

@Demivan
Copy link
Member

Demivan commented Jan 22, 2022

Ignoring watching all files in .gitignore will not work for everyone. I saw multiple projects that have tests importing code from the dist folder.

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

Successfully merging a pull request may close this issue.

5 participants