-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ngx-bootstrap/datepicker jest tests fails silently #6545
Comments
hansireit
added a commit
to hansireit/ngx-bootstrap
that referenced
this issue
Dec 21, 2023
- Removed duplicated unit test
hansireit
added a commit
to hansireit/ngx-bootstrap
that referenced
this issue
Dec 21, 2023
Unit-tests that cannot fail are useless, therefore I implemented this fix * unit test fail if the expected value does not match * remove duplicated unit test Closes valor-software#6545
hansireit
added a commit
to hansireit/ngx-bootstrap
that referenced
this issue
Dec 21, 2023
Unit-tests that cannot fail are useless, therefore this fix * unit test now fail if the expected value does not match * remove duplicated unit test Closes valor-software#6545
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
So, I've just cloned this repo, ran tests for datepicker component, all tests passed. But I think there is a problem with subscriptions in those tests, e.g:
ngx-bootstrap/src/datepicker/testing/bs-daterangepicker.spec.ts
Lines 307 to 311 in 663c70e
But RxJS throws error asynchorinously since version 6 https://v6.rxjs.dev/guide/v6/migration#typescript-prototype-operators . You can even add
throw new Error('Should fail')
to the subscription callback, and the test will pass. So some of these tests fail silently. In this case, this code block should look some thing like this:The text was updated successfully, but these errors were encountered: