socket.io-client icon indicating copy to clipboard operation
socket.io-client copied to clipboard

Feature Request: Docs/Support for client side unit testing of socketio clients

Open georgeedwards opened this issue 8 years ago • 2 comments

You want to:

  • [ ] report a bug
  • [x] request a feature

Current behaviour

If you have a front end application which uses the socketio client, it is unclear how you can unit test this functionality. I have described how the issue manifests with angular (but this is applicable to any client side unit testing) here. I can't seem to see any documentation for this or third part blogs/tutorials etc.

Expected behaviour

This should be a supported and documented use case.

georgeedwards avatar Jun 13 '17 19:06 georgeedwards

@darrachequesne Any ideas on this?

georgeedwards avatar Jun 17 '17 13:06 georgeedwards

@georgeedwards Module parse failed seems to be webpack (version 1.x, if I'm not mistaken) failing to read the sourcemap file (which is served by the server by default). I think you have to use null-loader to skip that file (see example here, the version on master should work for webpack 2.0).

Else, the workflow described in your stackoverflow question seems good to me. (integration test, not unit test right?)

darrachequesne avatar Jun 19 '17 11:06 darrachequesne