-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)
Description
Describe the bug
On the latest beta version, "vitest": "^4.0.0-beta.10", when passing a signal from new AbortController() to addEventListener, vitest fails with the following error:
function App() {
useEffect(() => {
const abortController = new AbortController();
const options = {
signal: abortController.signal,
};
document.addEventListener("pointerdown", () => {}, options);
}, []);
return <div>Hello world</div>;
}Failed to execute 'addEventListener' on 'EventTarget': parameter 3 dictionary has member 'signal' that is not of type 'AbortSignal'.
Downgrading back to 3.2.4 fixes the issue. Maybe related to #8390
Reproduction
Link to repro - run npm run test, it should fail
https://stackblitz.com/edit/vitejs-vite-gcbbdqsx?file=src%2FApp.spec.tsx
Downgrading vitest back to latest fixes the problem
System Info
System:
OS: Windows 11 10.0.26100
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Memory: 6.58 GB / 31.73 GB
Binaries:
Node: 24.7.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
npm: 11.5.1 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
Browsers:
Edge: Chromium (140.0.3485.54)
Internet Explorer: 11.0.26100.1882
npmPackages:
@vitejs/plugin-react: ^5.0.0 => 5.0.2
vite: ^7.1.2 => 7.1.5
vitest: ^4.0.0-beta.10 => 4.0.0-beta.11Used Package Manager
npm
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
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)
Type
Projects
Status
High Priority