Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FAIL src/tests/AcademicDetail.test.js
- ● Console
- console.error
- Warning: ReactDOMTestUtils.act is deprecated in favor of React.act. Import act from react instead of react-dom/test-utils. See https://react.dev/warnings/react-dom-test-utils for more info.
- 35 | test('renders loading state initially', () => {
- 36 | // Renderiza el componente
- > 37 | render(
- | ^
- 38 | <MemoryRouter>
- 39 | <AcademicDetail />
- 40 | </MemoryRouter>
- at printWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:71:30)
- at error (node_modules/react-dom/cjs/react-dom-test-utils.development.js:45:7)
- at actWithWarning (node_modules/react-dom/cjs/react-dom-test-utils.development.js:1736:7)
- at node_modules/@testing-library/react/dist/act-compat.js:63:25
- at renderRoot (node_modules/@testing-library/react/dist/pure.js:159:26)
- at render (node_modules/@testing-library/react/dist/pure.js:246:10)
- at Object.<anonymous> (src/tests/AcademicDetail.test.js:37:11)
- console.error
- Error: Uncaught [TypeError: Cannot read properties of undefined (reading 'pathname')]
- at reportException (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jsdom\lib\jsdom\living\helpers\runtime-script-errors.js:66:24)
- at innerInvokeEventListeners (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:341:9)
- at invokeEventListeners (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:274:3)
- at HTMLUnknownElementImpl._dispatch (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:221:9)
- at HTMLUnknownElementImpl.dispatchEvent (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js:94:17)
- ...
- at runTest (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jest-runner\build\runTest.js:475:34)
- at Object.worker (C:\Users\elfam\OneDrive\Desktop\ITBA\3erAño\PrimerCuatri\IngeSoft\Proyecto_G3\Proyecto_Ing_Soft\studenthub\node_modules\jest-runner\build\testWorker.js:133:12)
- ● AcademicDetail Frontend Tests › renders NavBar and DetailCard when activity is loaded
- TestingLibraryElementError: Unable to find an element with the text: /Mocked NavBar/i. 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>
- Loading...
- </div>
- </div>
- </body>
- 64 |
- 65 | // Verifica que se renderice el NavBar mockeado
- > 66 | expect(screen.getByText(/Mocked NavBar/i)).toBeInTheDocument();
- | ^
- 67 |
- 68 | // Espera a que se renderice el DetailCard y verifica su contenido
- 69 | await waitFor(() => {
- at Object.getElementError (node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/config.js:37:19)
- at node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:76:38
- at node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:52:17
- at getByText (node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/query-helpers.js:95:19)
- at Object.<anonymous> (src/tests/AcademicDetail.test.js:66:19)
- Test Suites: 1 failed, 2 passed, 3 total
- Tests: 1 failed, 3 passed, 4 total
- Snapshots: 0 total
- Time: 3.85 s
- Ran all test suites.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement