-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
When certain errors, like "ResizeObserver loop completed with undelivered notifications" happen, null is printed to stderr with absolutely no clues about what's going on.
Reproduction
it("foo", async () => {
const divElem = document.createElement("div");
divElem.style.width = "100px";
divElem.style.height = "100px";
document.body.appendChild(divElem);
const resizeObserver = new ResizeObserver((entries) => {
for (const entry of entries) {
entry.target.style.width = `${entry.contentBoxSize[0].inlineSize + 10}px`;
}
});
resizeObserver.observe(divElem);
await new Promise((resolve) => setTimeout(resolve, 1000));
resizeObserver.unobserve(divElem);
});Causes
...
stderr | test/suite.test.ts > foo
null
...
Repro: https://github.com/Janpot/vitest-observer-loop-repro/
Run pnpm test:run
System Info
System:
OS: macOS 14.6.1
CPU: (8) arm64 Apple M1
Memory: 76.13 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.11.1 - ~/.nvm/versions/node/v24.11.1/bin/node
npm: 11.6.2 - ~/.nvm/versions/node/v24.11.1/bin/npm
pnpm: 10.13.1 - ~/.nvm/versions/node/v24.11.1/bin/pnpm
Browsers:
Safari: 17.6
npmPackages:
@vitest/browser-playwright: ^4.0.16 => 4.0.16
@vitest/ui: latest => 4.0.16
vite: latest => 7.3.0
vitest: latest => 4.0.16Used 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)