Netflix / falcor-router

A Falcor JavaScript DataSource which creates a Virtual JSON Graph document on your app server.
http://netflix.github.io/falcor
Apache License 2.0
104 stars 46 forks source link

Fix usage of full Rx object in tests #200

Closed eddieajau closed 7 years ago

eddieajau commented 7 years ago

Fixes #197

Tests are currently using the full Rx object which is not available when using the router in production. This PR ensures all tests use a plain Observable (require('rxjs/Observable').Observable).

Additional operators and behaviours are added to make tests pass.

benlesh commented 7 years ago

@eddieajau this duplicate work to #199. It's also adding one operator that the router doesn't use, only the test does. I'm going to close this in favor of #199, not because I authored #199, but because the latter forces the tests to use the same version of the router Observable without altering it's prototype, which should give more predictable results in the long run (as long as we're diligent about not letting tests use the full Rx library)

Thank you for your contribution! I appreciate looking through someone else's solution to the problem and I'm very pleased you took the time and effort to look into this.

eddieajau commented 7 years ago

No worries. Thanks for the prompt fix :)