Open jamesdixon opened 9 years ago
Hi @jamesdixon. It is actually just a wrapper for bower package so:
I add a test helper:
Ember.Test.registerHelper 'stubWebSocket', (app, url)->
window.WebSocket = MockSocket
new MockServer(url)
then in tests
webSocketServer = stubWebSocket(user.get('id'))
webSocketServer.send(message)
andThen ->
assertPageIncludes 'Something on the page after message received'
Sorry for coffeescript, but I think you get the idea.
Could you please be kind and link/add some more tests examples? I am as well finding it difficult to get my tests running
Hi,
First off, thanks for turning this into an Ember CLI addon! Appreciated.
Second, do you have any examples of how you're using this in your Ember tests? I'm fairly new to testing and struggling with this a bit.
Thanks! James