using @rené-link
I have modified my babel.config.json with the below code. If you are using typescript, shadcn, react and jest.
{
"presets": ["@babel/preset-env", ["@babel/preset-react", {
"runtime": "automatic"
}], "@babel/preset-typescript"]
}