-
Notifications
You must be signed in to change notification settings - Fork 3k
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
refactor: refactor throwError operator to use factory function in unit tests and .ts file #6261
refactor: refactor throwError operator to use factory function in unit tests and .ts file #6261
Conversation
…t tests and .ts file
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.
I'm okay with the wholesale replacement in the implementation tests, but I think the dtslint tests - spec-dtslint/observables/throwError-spec.ts - need to include both. So, rather than replace the calls in the dtslint tests, copy them and then replace them.
Also, this PR seems to have some conflicts with what's currently in master.
Hi @cartant, i am little confuse here. Can you please help me with what i understood is correct or not?
`it('should accept any type and return never observable', () => { it('should support scheduler', () => { Please correct me if i am wrong. |
I'd create separate it('should support an error value and a scheduler', () => {
const a = throwError(1, animationFrameScheduler); // $ExpectType Observable<never>
});`
it('should support a factory and a scheduler', () => {
const a = throwError(() => 1, animationFrameScheduler); // $ExpectType Observable<never>
});` Also, you have the parentheses in the wrong place for the last test and that's what's failing in CI. |
…com/nitinmalave/rxjs into throwError-updated-factory-function
Got it. Thanks @cartant for quick support. I have committed this changes. Please take a look at it. |
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.
LGTM. Thanks.
…
Description:
Related issue (if exists):
Noop