|
1 | 1 | # Suspense Tests To-Do |
2 | 2 |
|
3 | | -- [x] test/use-swr-infinite.test.tsx — should update the getKey reference with the suspense mode (migrated to e2e/test/suspense-infinite-get-key.test.ts) |
4 | | -- [x] test/use-swr-suspense.test.tsx — should render fallback (migrated to e2e/test/suspense-render-fallback.test.ts) |
5 | | -- [x] test/use-swr-suspense.test.tsx — should render multiple SWR fallbacks (migrated to e2e/test/render-suspense-multiple-fallbacks.test.ts) |
6 | | -- [x] test/use-swr-suspense.test.tsx — should work for non-promises (migrated to e2e/test/render-suspense-non-promise.test.ts) |
7 | | -- [x] test/use-swr-suspense.test.tsx — should throw errors (migrated to e2e/test/render-suspense-error.test.ts) |
8 | | -- [ ] test/use-swr-suspense.test.tsx — should render cached data with error |
9 | | -- [ ] test/use-swr-suspense.test.tsx — should not fetch when cached data is present and `revalidateIfStale` is false |
10 | | -- [ ] test/use-swr-suspense.test.tsx — should pause when key changes |
11 | | -- [ ] test/use-swr-suspense.test.tsx — should render correctly when key changes (but with same response data) |
12 | | -- [ ] test/use-swr-suspense.test.tsx — should render correctly when key changes (from null to valid key) |
13 | | -- [ ] test/use-swr-suspense.test.tsx — should render initial data if set |
14 | | -- [ ] test/use-swr-suspense.test.tsx — should avoid unnecessary re-renders |
15 | | -- [ ] test/use-swr-suspense.test.tsx — should return `undefined` data for falsy key |
16 | | -- [ ] test/use-swr-suspense.test.tsx — should only render fallback once when `keepPreviousData` is set to true |
17 | | -- [ ] test/use-swr-streaming-ssr.test.tsx — should match the ssr result when streaming and partially hydrating (failing) |
18 | | -- [ ] test/use-swr-fetcher.test.tsx — should use the latest fetcher reference with the suspense mode when the key has been changed |
19 | | -- [ ] test/use-swr-infinite-preload.test.tsx — preload the fetcher function with the suspense mode |
20 | | -- [ ] test/use-swr-infinite-preload.test.tsx — avoid suspense waterfall by prefetching the resources (skipped) |
21 | | -- [ ] test/use-swr-server.test.tsx — should enable the IS_SERVER flag - suspense on server without fallback |
22 | | -- [ ] test/use-swr-promise.test.tsx — should suspend when resolving the fallback promise |
23 | | -- [ ] test/use-swr-promise.test.tsx — should handle errors with fallback promises |
24 | | -- [ ] test/use-swr-promise.test.tsx — should handle same fallback promise that is already pending |
25 | | -- [ ] test/use-swr-preload.test.tsx — preload the fetcher function with the suspense mode |
26 | | -- [ ] test/use-swr-preload.test.tsx — avoid suspense waterfall by prefetching the resources |
| 3 | +- [x] test/use-swr-infinite.test.tsx — should update the getKey reference with the suspense mode (covered in e2e/test/suspense-scenarios.test.ts) |
| 4 | +- [x] test/use-swr-suspense.test.tsx — should render fallback (covered in e2e/test/suspense-scenarios.test.ts) |
| 5 | +- [x] test/use-swr-suspense.test.tsx — should render multiple SWR fallbacks (covered in e2e/test/suspense-scenarios.test.ts) |
| 6 | +- [x] test/use-swr-suspense.test.tsx — should work for non-promises (covered in e2e/test/suspense-scenarios.test.ts) |
| 7 | +- [x] test/use-swr-suspense.test.tsx — should throw errors (covered in e2e/test/suspense-scenarios.test.ts) |
| 8 | +- [x] test/use-swr-suspense.test.tsx — should render cached data with error (covered in e2e/test/suspense-scenarios.test.ts) |
| 9 | +- [x] test/use-swr-suspense.test.tsx — should not fetch when cached data is present and `revalidateIfStale` is false (covered in e2e/test/suspense-scenarios.test.ts) |
| 10 | +- [x] test/use-swr-suspense.test.tsx — should pause when key changes (covered in e2e/test/suspense-scenarios.test.ts) |
| 11 | +- [x] test/use-swr-suspense.test.tsx — should render correctly when key changes (but with same response data) (covered in e2e/test/suspense-scenarios.test.ts) |
| 12 | +- [x] test/use-swr-suspense.test.tsx — should render correctly when key changes (from null to valid key) (covered in e2e/test/suspense-scenarios.test.ts) |
| 13 | +- [x] test/use-swr-suspense.test.tsx — should render initial data if set (covered in e2e/test/suspense-scenarios.test.ts) |
| 14 | +- [x] test/use-swr-suspense.test.tsx — should avoid unnecessary re-renders (covered in e2e/test/suspense-scenarios.test.ts) |
| 15 | +- [x] test/use-swr-suspense.test.tsx — should return `undefined` data for falsy key (covered in e2e/test/suspense-scenarios.test.ts) |
| 16 | +- [x] test/use-swr-suspense.test.tsx — should only render fallback once when `keepPreviousData` is set to true (covered in e2e/test/suspense-scenarios.test.ts) |
| 17 | +- [x] test/use-swr-streaming-ssr.test.tsx — should match the ssr result when streaming and partially hydrating (covered in e2e/test/streaming-partial-hydration.test.ts) |
| 18 | +- [x] test/use-swr-fetcher.test.tsx — should use the latest fetcher reference with the suspense mode when the key has been changed (covered in e2e/test/suspense-scenarios.test.ts) |
| 19 | +- [x] test/use-swr-infinite-preload.test.tsx — preload the fetcher function with the suspense mode (covered in e2e/test/suspense-scenarios.test.ts) |
| 20 | +- [x] test/use-swr-infinite-preload.test.tsx — avoid suspense waterfall by prefetching the resources (covered in e2e/test/preload-scenarios.test.ts) |
| 21 | +- [x] test/use-swr-server.test.tsx — should enable the IS_SERVER flag - suspense on server without fallback (covered in e2e/test/server-suspense.test.ts) |
| 22 | +- [x] test/use-swr-promise.test.tsx — should suspend when resolving the fallback promise (covered in e2e/test/promise-scenarios.test.ts) |
| 23 | +- [x] test/use-swr-promise.test.tsx — should handle errors with fallback promises (covered in e2e/test/promise-scenarios.test.ts) |
| 24 | +- [x] test/use-swr-promise.test.tsx — should handle same fallback promise that is already pending (covered in e2e/test/promise-scenarios.test.ts) |
| 25 | +- [x] test/use-swr-preload.test.tsx — preload the fetcher function (covered in e2e/test/preload-scenarios.test.ts) with the suspense mode |
| 26 | +- [x] test/use-swr-preload.test.tsx — avoid suspense waterfall by prefetching the resources (covered in e2e/test/preload-scenarios.test.ts) |
0 commit comments