Skip to content

engine.io client in jest tests fails to connect with engine.io server #537

Closed
@jeduden

Description

@jeduden

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug

Current behaviour

If running engine 3.1.3 ( and also socket.io 2 ) in jest, the client is not able to connect to the server.
Same test with jasmine works fine.

Steps to reproduce (if the current behaviour is a bug)

Since there are a couple of variants to consider; I created a repository:
https://github.com/jeduden/jest-issue

Expected behaviour

Be able to use engine.io 3 / socket.io 2 within jest test.

Setup

  • OS: osx
  • browser: node 8
  • engine.io version: 3.1.3

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Please refer to the repo: https://github.com/jeduden/jest-issue .
It includes logs, example code and variants of the issue.

Currently, I have no idea what the cause of this issue is. There was this issue socketio/socket.io#2381 but running socket.io 2 in a node sandboxe works just fine using jasmine.
uWS is also not the issue. It works fine in jest.


Also filed this issue in the jest repo: jestjs/jest#4815

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions