fix: react.use should not depend on data condition #218
Annotations
3 errors
test
Process completed with exit code 1.
|
useSWR - concurrent rendering › should pause when changing the key inside a transition:
test/use-swr-concurrent-rendering.test.tsx#L61
TestingLibraryElementError: Unable to find an element with the text: isPending:0,data:swr-key-3900675. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div>
isPending:
0
,
loading
</div>
</div>
</body>
at Object.getElementError (node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (test/use-swr-concurrent-rendering.test.tsx:61:12)
|
useSWR - suspense › should only render fallback once when `keepPreviousData` is set to true:
test/use-swr-suspense.test.tsx#L422
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
at Object.toHaveBeenCalledTimes (test/use-swr-suspense.test.tsx:422:22)
|