https://github.com/mcous/user-event-clipboard-leak
https://github.com/mcous/user-event-clipboard-leak
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mcous/user-event-clipboard-leak
- Owner: mcous
- Created: 2024-08-21T19:32:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T19:36:14.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T03:25:51.411Z (about 1 year ago)
- Language: TypeScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `@testing-library/user-event` clipboard state leak
In Vitest - or any test runner that does not expose global `afterEach` and `afterAll` functions - clipboard stub state is not reset between tests.
```shell
gh repo clone mcous/user-event-clipboard-leak
cd user-event-clipboard-leak
npm install
npm run test:globals # pass
npm run test:no-globals # fail
```