Skip to content

Instantly share code, notes, and snippets.

@ilyavf
Created December 5, 2016 14:59
Show Gist options
  • Save ilyavf/51fd0533a95e29ec32bbc7336641a475 to your computer and use it in GitHub Desktop.
Save ilyavf/51fd0533a95e29ec32bbc7336641a475 to your computer and use it in GitHub Desktop.

Goal

Show how to test RESTful front-end models that use socket.io as its transport.

Plan

  1. Warm up: build a small app with realtime communication using socket.io (maybe a chat).
  2. Refactor: rebuild model layer to be RESTful via sockets.
  3. Ask how should we test this, and talk about options.
  4. Show what can-socket-fixture is for, and try to test with it.
  5. Show that if we subscribe to socket events inside a model module then its a problem to intercept socket.io to fixture it.
  6. Show steal-socket.io which can help with #5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment