testing-library / testing-library/user-event
Release a new version with fix, that is already in main branch
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction example
N/A
Prerequisites
Hi! When test infra is re-used between jsdom env and node e2e(puppeteer/playwright/etc) env, current 14.6.1 breaks every e2e test as there is no window. We don't call user-event in pup, but cjs import itself leads to test crash.
This commit is the fix: https://github.com/testing-library/user-event/commit/4f882e63ec53146ae33215e646912f73b42b5bdc
Please, release a new version. Currently we have to use yarn's patch mechanism in every project (there are many), which is not very scalable or convenient and is a dirty hack by nature.
First thing tried to write in discord, but there is no reaction for months :(
Expected behavior
node env not throws
Actual behavior
throws when trying access navigator on window that doesn't exist in e2e node env.
User-event version
14.6.1
Environment
puppeteer tests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing commit 4f882e63ec53146ae33215e646912f73b42b5bdc and the repository's release process. Verify that a published version containing the fix no longer crashes in a Node-based Puppeteer or Playwright environment, then confirm the new version is available to users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100