-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$watchAsObservable not being fired in unit tests #51
Comments
@syonip Could you provide more detail about how the vm was constructed? |
Thanks for helping. Here is the vm creation function:
I don't think it's to do with sinon.spy, because this test used to pass before I changed the implementation to use vue-rx. |
There is also an issue concerning Angular, RxJS observables, and unit tests (angular/angular#10127) where some observables don't fire when the clock is mocked. In that issue there are some workarounds described and also an explanation why this happens with a mocked clock. I couldn't completely verify this because at some point I got lost in RxJS's source code but the explanation sounds reasonable. |
@syonip I'm testing karma.I 'm using typescript. But the TS2339 occur when I use vueRx |
I am testing with karma, and I've notice this.$watchAsObservable('text') doesn't emit values even though this.text has changed.
Thanks.
The test:
The code:
The text was updated successfully, but these errors were encountered: