fix: ts-vitest-installation

This commit is contained in:
Alex Lohr
2022-05-19 21:30:06 +02:00
parent 332b634e76
commit 1f2f934205
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -5,7 +5,10 @@ const typesPath = path.resolve('node_modules', '@types', 'testing-library__jest-
const refMatcher = /[\r\n]+\/\/\/ <reference types="jest" \/>/; const refMatcher = /[\r\n]+\/\/\/ <reference types="jest" \/>/;
fs.readFile(typesPath, 'utf8', (err, data) => { fs.readFile(typesPath, 'utf8', (err, data) => {
if (err) throw err; if (err) {
console.warn('\x1b[33m⚠️ this template expects @types/testing-library__jest-dom to be installed, but it is missing.\n Please run:\x1b[0m\n\npnpm i --save-dev @types/testing-library__jest-dom\n');
return;
}
fs.writeFile( fs.writeFile(
typesPath, typesPath,
+1
View File
@@ -14,6 +14,7 @@
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@testing-library/jest-dom": "^5.16.3", "@testing-library/jest-dom": "^5.16.3",
"@types/testing-library__jest-dom": "^5.14.3",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"solid-testing-library": "^0.3.0", "solid-testing-library": "^0.3.0",
"typescript": "^4.6.3", "typescript": "^4.6.3",