Adding 'jsdom' to vite.config.ts brings the following error:
No overload matches this call.
The last overload gave the following error.
Argument of type '{ plugins: PluginOption[][]; test: { environment: string; }; }' is not assignable to parameter of type 'UserConfigExport'.
Object literal may only specify known properties, and 'test' does not exist in type 'UserConfigExport'.ts(2769)
index.d.ts(579, 25): The last overload is declared here.
Here is the vite.confg.ts code with the highlighted error:
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
},
})
Attemped type adding with TS and ChatGPT to resolve error.