After configuring the following:
import * as enzyme from 'enzyme';
import * as Adapter from 'enzyme-adapter-react-16';
enzyme.configure({ adapter: new Adapter() });
When running jest --watch
, everything works as expected. But, when running webpack --watch
, I get:
TS2350: Only a void function can be called with the 'new' keyword.
I couldn't find a solution, and I don't understand what's wrong.
I would love to get a hand. Thanks.
I missed yarn add @types/enzyme-adapter-react-16
That fixed it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With