Ninja-Squad / ngx-speculoos

Simpler, cleaner Angular unit tests
https://ngx-speculoos.ninja-squad.com/
MIT License
73 stars 3 forks source link

feat: throw when selecting invalid index, value or label #356

Closed jnizet closed 3 months ago

jnizet commented 3 months ago

BREAKING CHANGE: TestSelect's selectIndex, selectValue and selectLabel methods now throw if an invalid index, value or label is passed, instead of ignoring it.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.60%. Comparing base (6a5225a) to head (7c9c7cd).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356/graphs/tree.svg?width=650&height=150&src=pr&token=DrPAQryyFW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad)](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad) ```diff @@ Coverage Diff @@ ## master #356 +/- ## ========================================== + Coverage 97.57% 97.60% +0.02% ========================================== Files 12 12 Lines 371 375 +4 Branches 96 97 +1 ========================================== + Hits 362 366 +4 Misses 6 6 Partials 3 3 ``` | [Files](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad) | Coverage Δ | | |---|---|---| | [projects/ngx-speculoos/src/lib/test-select.ts](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356?src=pr&el=tree&filepath=projects%2Fngx-speculoos%2Fsrc%2Flib%2Ftest-select.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad#diff-cHJvamVjdHMvbmd4LXNwZWN1bG9vcy9zcmMvbGliL3Rlc3Qtc2VsZWN0LnRz) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad). Last update [6a5225a...7c9c7cd](https://app.codecov.io/gh/Ninja-Squad/ngx-speculoos/pull/356?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ninja+Squad).