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

[browser] mocking + cacheDir fails for some cacheDirs #6916

Open
6 tasks done
meesvandongen opened this issue Nov 15, 2024 · 0 comments
Open
6 tasks done

[browser] mocking + cacheDir fails for some cacheDirs #6916

meesvandongen opened this issue Nov 15, 2024 · 0 comments

Comments

@meesvandongen
Copy link

Describe the bug

When using vitest browser mode, mocking does not work if cacheDir is set to a subparent directory.
This DOES work properly in node mode.

Reproduction

https://github.com/meesvandongen/vitest-repro

npm run test:child:browser // success
npm run test:parent:browser // fails
npm run test:parent:node // success

System Info

browser = chrome, playwright; did not test with other setups

  System:
    OS: macOS 15.1
    CPU: (16) arm64 Apple M3 Max
    Memory: 7.45 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
    pnpm: 9.4.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.31 - ~/.bun/bin/bun
  Browsers:
    Chrome: 131.0.6778.69
    Edge: 131.0.2903.48
    Safari: 18.1
  npmPackages:
    @vitest/browser: ^2.1.5 => 2.1.5

Used Package Manager

npm

Validations

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

No branches or pull requests

1 participant