-
-
Notifications
You must be signed in to change notification settings - Fork 206
Accept subscribable on rxLet input #1657
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
Accept subscribable on rxLet input #1657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the PR @Rush, I left a comment for adding a test case. Would you mind creating it?
Hello @AlirezaEbrahimkhani Anything you need to move this PR forward? |
add55ca
to
c9e9c94
Compare
05a515b
to
c9e9c94
Compare
it('should display value from Subscribable', fakeAsync(() => { | ||
letDirectiveTestComponent.value$ = 42; | ||
fixtureLetDirectiveTestComponent.detectChanges(); | ||
expect(componentNativeElement.textContent.trim()).toBe('42'); | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test doesn't test the subscribable
. You are essentially overwriting the BehaviorSubject
with a number
which is getting rendered.
Instead, you should provide an actual Subscribable
.
it('should display value from Subscribable', fakeAsync(() => { | |
letDirectiveTestComponent.value$ = 42; | |
fixtureLetDirectiveTestComponent.detectChanges(); | |
expect(componentNativeElement.textContent.trim()).toBe('42'); | |
})); | |
it('should display value from Subscribable', () => { | |
letDirectiveTestComponent.value$ = { | |
subscribe: ({ next }) => { | |
next(42) | |
} | |
}; | |
fixtureLetDirectiveTestComponent.detectChanges(); | |
expect(componentNativeElement.textContent.trim()).toBe('42'); | |
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as pointed out in the other comment, please adjust the spec so that it actually tests for a subscribable input
@AlirezaEbrahimkhani any update? :-) |
@hoebbelsB I'll make it from the scratch on my fork |
close in favor of #1721 thank u @AlirezaEbrahimkhani for the initial contribution! |
resolves #1541