Skip to content
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

[Feature]: Support outputFromObservable interop function for output #2374

Closed
bederuijter opened this issue Apr 8, 2024 · 0 comments · Fixed by #2418
Closed

[Feature]: Support outputFromObservable interop function for output #2374

bederuijter opened this issue Apr 8, 2024 · 0 comments · Fixed by #2418

Comments

@bederuijter
Copy link

🚀 Feature Proposal

Angular 17.3 added outputFromObservable as interop function to create an output that emits the values of an observable stream. This simplifies passing values to an output when an observable stream emits.

public onChange$ = Subject<void>();
public isChanged = outputFromObservable(this.onChange$);

When the tests are run, the emitted values of isChanged are not captured by the tests.

    expect(jest.fn()).toHaveBeenCalled()

    Expected number of calls: >= 1
    Received number of calls:    0

A similar test in jasmine succeeds. Using the long-hand of manually subscribing to the stream and calling a output directly also works.

Motivation

It would be nice if outputFromObservable could be used, instead of needing to use the long-hand form, which involves manually needing to subscribing to the stream calling output instead

Example

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant