yurisldk / realworld-react-fsd

A social blogging site powered by React, Zustand, React-Query on FSD (Feature-Sliced Design) architectural methodology.
https://realworld-fsd.netlify.app
MIT License
294 stars 59 forks source link

Update/Add test cases for entities slice #1

Closed yurisldk closed 1 year ago

yurisldk commented 1 year ago
  1. adds @mswjs/data ^0.13.0
  2. setups MSW with mswjs/data
  3. adds new test cases (mostly for api tests)
  4. updates tests logic (msw API handlers)
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.08 :tada:

Comparison is base (e3675a4) 98.83% compared to head (c7d917c) 98.92%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1 +/- ## =========================================== + Coverage 98.83% 98.92% +0.08% =========================================== Files 36 42 +6 Lines 1293 1401 +108 Branches 117 136 +19 =========================================== + Hits 1278 1386 +108 Misses 15 15 ``` | [Impacted Files](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri) | Coverage Δ | | |---|---|---| | [...ities/article/api/msw/getGlobalArticlesHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL2FydGljbGUvYXBpL21zdy9nZXRHbG9iYWxBcnRpY2xlc0hhbmRsZXJzLnRz) | `100.00% <100.00%> (ø)` | | | [...tities/article/api/msw/getSingleArticleHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL2FydGljbGUvYXBpL21zdy9nZXRTaW5nbGVBcnRpY2xlSGFuZGxlcnMudHM=) | `100.00% <100.00%> (ø)` | | | [...ntities/article/api/msw/getUserArticlesHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL2FydGljbGUvYXBpL21zdy9nZXRVc2VyQXJ0aWNsZXNIYW5kbGVycy50cw==) | `100.00% <100.00%> (ø)` | | | [...ies/comment/api/msw/getArticlesCommentsHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL2NvbW1lbnQvYXBpL21zdy9nZXRBcnRpY2xlc0NvbW1lbnRzSGFuZGxlcnMudHM=) | `100.00% <100.00%> (ø)` | | | [...es/profile/api/msw/getProfileByUsernameHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL3Byb2ZpbGUvYXBpL21zdy9nZXRQcm9maWxlQnlVc2VybmFtZUhhbmRsZXJzLnRz) | `100.00% <100.00%> (ø)` | | | [...entities/session/api/msw/getCurrentUserHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL3Nlc3Npb24vYXBpL21zdy9nZXRDdXJyZW50VXNlckhhbmRsZXJzLnRz) | `100.00% <100.00%> (ø)` | | | [src/entities/tag/api/msw/getTagsHandlers.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL2VudGl0aWVzL3RhZy9hcGkvbXN3L2dldFRhZ3NIYW5kbGVycy50cw==) | `100.00% <100.00%> (ø)` | | | [src/shared/lib/msw/config/index.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL3NoYXJlZC9saWIvbXN3L2NvbmZpZy9pbmRleC50cw==) | `100.00% <100.00%> (ø)` | | | [src/shared/lib/msw/index.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL3NoYXJlZC9saWIvbXN3L2luZGV4LnRz) | `100.00% <100.00%> (ø)` | | | [src/shared/lib/msw/lib/index.ts](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri#diff-c3JjL3NoYXJlZC9saWIvbXN3L2xpYi9pbmRleC50cw==) | `100.00% <100.00%> (ø)` | | | ... and [4 more](https://app.codecov.io/gh/sldk-yuri/realworld-react-fsd/pull/1?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuri) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.