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

Ошибки при рендере компонента Modal в тестах react-test-renderer #489

Closed
DronVol opened this issue Jan 27, 2023 · 1 comment · Fixed by #523

Comments

@DronVol
Copy link

DronVol commented Jan 27, 2023

При рендере компонента Modal в тестовой среде react-test-renderer происходят следующие ошибки

Error: Uncaught [TypeError: mql.removeEventListener is not a function]
FocusLock: could not obtain ref to internal node
Error: Uncaught [TypeError: _reactDom.default.findDOMNode is not a function]

arui-scripts: 13.2.0
react: 16.14.0
core-components: 37.2.0
Chrome: 109.0.5414.87
typescript: 4.7.4
react-test-renderer: 16.9.0
Mac OS

Частично проблема решается обновлением FocusLock до версии 2.9.2
theKashey/react-focus-lock#123

@v-gevak v-gevak linked a pull request Feb 9, 2023 that will close this issue
@v-gevak
Copy link
Contributor

v-gevak commented Feb 9, 2023

react-focus-lock обновим.

mql.removeEventListener is not a function - это мокать надо - https://stackoverflow.com/questions/39830580/jest-test-fails-typeerror-window-matchmedia-is-not-a-function

Почему findDOMNode is not a function надо локально разбираться

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants