canjs / can-connect-feathers

The FeathersJS client library for DoneJS and can-connect
https://canjs.com/doc/can-connect-feathers.html
MIT License
10 stars 4 forks source link

makes tests work with canjs's integration tests #51

Closed justinbmeyer closed 7 years ago

justinbmeyer commented 7 years ago

This re-writes the tests to try to only setup fixtures when absolutely necessary.

This works for service tests, but not for session tests.

session tests initialize their fixtures and provider immediately. This is to avoid a warning from event emitters that there are too many event bindings. There are a lot of event bindings if we created the connection every time because of:

authAgent.on('login', function (token) { ... })

Essentially every connection listens to this login event. The fix would be for /session to add a .teardown() method to connections so this can be unbound. Then we could call that in the teardown of every test.

Until this time, there is a chance of conflicting fixtures.