Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Module "mock-socket" can cause false test positives and negatives

Open
#75 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reviewing the mock-socket server mock as a replacement for the ws Server and the listed compatibility issues: ping, connect-event values, request objects, and socket identity. Then inspect the blocked slow-reconnect test in the issue body and determine what behavior must be supported for that test to be reliable. Done means the false-positive and false-negative risks are resolved or the test strategy is clearly adjusted.

Written by the indexing model from the issue text.

Description

There are multiple issues with the library, specifically with the server mock used - in our case - as a drop-in replacement for the ws Server. It may be the case that that is not its intended use case.

Issues:

This also prevents us from implementing this test:

    it('prints connect on slow reconnect', async function() {
      const rc = createRemoteConsoleClient(debugServer, webSocketFactory);
      const logPromise = waitForCalls(terminal.log, 2, 8000);
      rc._webSocket.close(1000);
      rc._disposeSocket();
      await new Promise(resolve => setTimeout(resolve, 4000));
      rc._connect();
      const log = await logPromise;
      expect(log).to.contain(' connected');
    }).timeout(10000);
Dominant language
JavaScript
Stars
11
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from eclipsesource/tabris-js-cli

All issues in eclipsesource/tabris-js-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.