libp2p / libp2p/js-libp2p

Move WebRTC stream timeline and flag handling tests to interface compliance suite for all transports

Open
#3,360 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need/triage
Dominant language
TypeScript
Stars
2.6k
Forks
546
Avg merge
8h 18m
Merged PRs (30d)
16

Description

Description

There are three test suites in packages/transport-webrtc/test/stream.spec.ts that are currently skipped with describe.skip and have TODO comments indicating they should be moved to the transport interface compliance test suite.

These tests validate stream behavior that should be consistent across ALL transport implementations (TCP, WebRTC, WebSockets, WebTransport, etc.), not just WebRTC.

Current Behavior

The following test suites are skipped in packages/transport-webrtc/test/stream.spec.ts:

  1. Stream Stats (line 120)

    • Tests stream timeline tracking (open/close)
    • Tests write status transitions
    • Tests read status transitions
  2. Stream Read Stats Transition By Incoming Flag (line 188)

    • Tests how streams handle incoming FIN flags
    • Tests how streams handle STOP_SENDING flags
  3. Stream Write Stats Transition By Incoming Flag (line 231)

    • Tests how streams handle outgoing close flags

Each has a comment:

// TODO: move to transport interface compliance suite
describe.skip('Stream Stats', () => {

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 in packages/transport-webrtc/test/stream.spec.ts and inspect the transport interface compliance test suite. Move the three skipped suites covering stream stats and incoming or outgoing flags there, then run the compliance tests across the listed transports to confirm the behavior is validated consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
networking, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.