toss / suspensive

Manage asynchronous operations, timing, error handling, detecting intersection of elements, and caching easily and declaratively
https://suspensive.org
MIT License
508 stars 48 forks source link

test(react-await): improve test coverage for `await.spec.tsx` (`unsubscribe` method) #1007

Closed saul-atomrigs closed 3 months ago

saul-atomrigs commented 3 months ago

Overview

This PR improves the test coverage for react-await. In detail, it adds the test case for unsubscribe method in the AwaitClient class.

AS-IS

Captura de pantalla 2024-06-29 a las 2 43 22 p  m

TO-BE

Captura de pantalla 2024-06-29 a las 2 43 42 p  m

PR Checklist

  1. I read the Contributing Guide
  2. I added documents and tests.
changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: a9114cdb9e07bebbc232244ba187dd347b8ff2c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 29, 2024 1:44pm
v1.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 29, 2024 1:44pm
visualization.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 29, 2024 1:44pm
codecov-commenter commented 3 months ago

Codecov Report

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

Project coverage is 87.33%. Comparing base (46cae9e) to head (a9114cd).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/toss/suspensive/pull/1007/graphs/tree.svg?width=650&height=150&src=pr&token=5PopssACmx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss)](https://app.codecov.io/gh/toss/suspensive/pull/1007?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) ```diff @@ Coverage Diff @@ ## main #1007 +/- ## ======================================= Coverage 87.33% 87.33% ======================================= Files 38 38 Lines 450 450 Branches 99 98 -1 ======================================= Hits 393 393 Misses 54 54 Partials 3 3 ``` | [Components](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | Coverage Δ | | |---|---|---| | [@suspensive/react](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `97.03% <ø> (ø)` | | | [@suspensive/react-query](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `∅ <ø> (∅)` | | | [@suspensive/react-query-4](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `0.00% <ø> (ø)` | | | [@suspensive/react-query-5](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `0.00% <ø> (ø)` | | | [@suspensive/react-await](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `100.00% <ø> (ø)` | | | [@suspensive/react-image](https://app.codecov.io/gh/toss/suspensive/pull/1007/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `80.39% <ø> (ø)` | |
codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #1007 will create unknown performance changes

Comparing saul-atomrigs:test/react-await/Await (a9114cd) with main (46cae9e)

Summary

:warning: No benchmarks were detected in both the base of the PR and the PR.

manudeli commented 3 months ago

@saul-atomrigs resolve ci:eslint please

saul-atomrigs commented 3 months ago

Captura de pantalla 2024-06-29 a las 10 35 55 p  m

@manudeli It is now fixed, passing the lint checking too. Thaaanks!

manudeli commented 3 months ago

Thanks! 🚀🚀

You are making 100% test coverage of Suspensive