Skip to content
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

[Jest] TypeError: Cannot read properties of null (reading 'offsetHeight') changing tabs on work page #30

Open
nicholeuf opened this issue Feb 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@nicholeuf
Copy link
Owner

nicholeuf commented Feb 19, 2024

Issue created in MUI: mui/material-ui#41388

On #29, I tried to write a test that tests that the Tabs.onChange handler is called when changing tabs, but I'm running into an error in jest. This behavior only seems to happen under test so I'm going to punt on finishing this test later. Related:

TypeError: Cannot read properties of null (reading 'offsetHeight')

      at setMeasurements (node_modules/@mui/material/node/Tabs/ScrollbarSize.js:40:47)
      at node_modules/@mui/material/node/Tabs/ScrollbarSize.js:58:5
      at commitHookEffectListMount (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12999:26)
      at commitPassiveMountOnFiber (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14422:11)
      at commitPassiveMountEffects_complete (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14382:9)
      at commitPassiveMountEffects_begin (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14369:7)
      at commitPassiveMountEffects (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14357:3)
      at flushPassiveEffectsImpl (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16248:3)
      at flushPassiveEffects (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16197:14)
      at node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16012:9
      at workLoop (node_modules/scheduler/cjs/scheduler.development.js:266:34)
      at flushWork (node_modules/scheduler/cjs/scheduler.development.js:239:14)
      at performWorkUntilDeadline (node_modules/scheduler/cjs/scheduler.development.js:533:21)
      at Timeout.task [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:520:19)
@nicholeuf nicholeuf added the bug Something isn't working label Feb 19, 2024
nicholeuf added a commit that referenced this issue Feb 19, 2024
To be completed in #30
@nicholeuf nicholeuf mentioned this issue Feb 19, 2024
@nicholeuf nicholeuf self-assigned this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant