-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
tests(svelte-query): Reorganise for multiple components per test #7654
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 6d6a378. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6d6a378:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7654 +/- ##
===========================================
+ Coverage 44.08% 80.86% +36.77%
===========================================
Files 185 18 -167
Lines 7054 162 -6892
Branches 1553 32 -1521
===========================================
- Hits 3110 131 -2979
+ Misses 3578 27 -3551
+ Partials 366 4 -362
|
Compared to the react-query tests, it's not quite as straightforward to write svelte-query tests, as they can't be included as functions within the test definition, but need to be separate file components.
This PR refactors each source file's tests to be a folder, making it easier to add multiple components per test (rather than trying to conform a single component to poorly suit multiple tests).
As a demo, I've added new tests for
useIsFetching
andQueryClientProvider
, and an additional test forcreateQuery
I'm hoping this structure will make it easier to add more tests going forward!
Coverage is up from
69.42%
to80.99%