Little lately, I have found that my react project in the VS Code IDE is using require syntax in the test cases when I'm doing auto import from the suggestions. Could anyone please help?
I'm using React testing library and here's how it looks like.
const { render } = require("@testing-library/react");
const { default: Home } = require("../Home");
describe("Home", () => {
it("should render Search page", () => {
const { container } = render(<Home />);
});
});
I have a jsconfig.json file as follows
{
"compilerOptions": {
"baseUrl": "src"
},
"include": [
"src"
],
}