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
As well as we had added unit-tests to our Bit components using Jest 27.5.1, Bit started to fail all the tests with "ReferenceError: shallow is not defined". We use setupTests.js to configure globals.
import { configure, shallow, render, mount } from 'enzyme'
import Adapter from '@wojtekmaj/enzyme-adapter-react-17'
configure({ adapter: new Adapter() })
global.shallow = shallow
global.render = render
global.mount = mount
I checked the environment: "bit env get teambit.react/react ", it has the same config for Jest regarding setupTests.js, but it does not work properly.
Who faced the issue and found out a fix?
I managed to bypass tests by means of command line key --skip-tests for a while, until we fix the root cause. However, is there a way to turn off tests temporarily in workspace.jsonc? Tried
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
-
Hi, all!
As well as we had added unit-tests to our Bit components using Jest 27.5.1, Bit started to fail all the tests with "ReferenceError: shallow is not defined". We use setupTests.js to configure globals.
And use package.json to configure Jest:
I checked the environment: "bit env get teambit.react/react ", it has the same config for Jest regarding setupTests.js, but it does not work properly.
Who faced the issue and found out a fix?
I managed to bypass tests by means of command line key --skip-tests for a while, until we fix the root cause. However, is there a way to turn off tests temporarily in workspace.jsonc? Tried
But with no luck.
Beta Was this translation helpful? Give feedback.
All reactions