You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
babel-plugin-jest-hoist: The module factory of jest.mock() is not allowed to reference any out-of-scope variables.
Invalid variable access: _jsxFileName
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Im getting this error when I run my jest unit tests that uses these carbon charts:
I mocked the actual charts from the repository
Mocks:
So now in screen.logTestingPlaygroundURL(), I get the page but no charts render. I have modified the mocks to this:
but I get the error:
babel-plugin-jest-hoist: The module factory of
jest.mock()
is not allowed to reference any out-of-scope variables.Invalid variable access: _jsxFileName
Is there a way to fix this?
Beta Was this translation helpful? Give feedback.
All reactions