Runnpm install --save-dev svelte-jester jest babel-jest @testing-library/svelte @babel/preset-env @babel/core
"test": "jest src"
"jest": {
"bail": false,
"moduleFileExtensions": [
"js",
"svelte"
],
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.svelte$": "svelte-jester"
},
"verbose": true
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}