-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
I try to set up my vite headers as close to production as possible, and therefore set CSP headers, including 'X-Frame-Options': 'DENY',. However, this breaks vitest in browser mode, which apparently runs tests inside an iframe.
Reproduction
https://github.com/IanVS/reproduction-vitest-browser-frame
System Info
System:
OS: macOS 14.4.1
CPU: (12) arm64 Apple M2 Max
Memory: 294.08 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - ~/Library/Caches/fnm_multishells/15320_1716989283011/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/15320_1716989283011/bin/yarn
npm: 9.5.1 - ~/Library/Caches/fnm_multishells/15320_1716989283011/bin/npm
pnpm: 8.8.0 - ~/Library/Caches/fnm_multishells/15320_1716989283011/bin/pnpm
Browsers:
Safari: 17.4.1
npmPackages:
@vitest/browser: ^1.6.0 => 1.6.0
@vitest/ui: latest => 1.6.0
vite: latest => 5.2.12
vitest: latest => 1.6.0Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)