matrix-org / matrix-org/matrix-js-sdk

Switch test environment to jsdom to use EventTarget

Open
#2,594 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-Testing T-Task
Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

We write our own EventTarget implementation in a couple of places (eg. https://github.com/matrix-org/matrix-js-sdk/blob/develop/spec/test-utils/webrtc.ts#L96) - we should investigate whether we can use EventTarget directly by switching the test environment to jsdom.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with spec/test-utils/webrtc.ts, especially the custom EventTarget implementation, and inspect the repository's current test environment configuration. Run the relevant tests before changing the environment; the work is done when jsdom provides a usable EventTarget and the duplicated implementations can be replaced without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.