SyntaxError: Cannot use import statement outside a module- react native testing

Im trying to write tests for my RN app using jest and testing library. When i try to execute a

const {debug} = render(<MyComponent/>);
debug();

I get SyntaxError: Cannot use import statement outside a module

I am using multiple plugins in my code, this first came for image resizer, which was gone when i added it in ignoreTransformPatterns in package.json. Then it came for vector icons. Do i have to write the transform for each plugin?

RN: 0.62.2 @testing-library/react-native: 7.1.0