🔥 Remove unnecessary postinstall scripts and config (fix #61 and #50)

This commit is contained in:
Alexandre Mouton-Brady
2022-08-27 11:26:19 +02:00
parent 93c0b7eca8
commit 733b6cdf77
6 changed files with 2 additions and 53 deletions
-18
View File
@@ -1,18 +0,0 @@
import fs from 'fs';
import path from 'path';
const typesPath = path.resolve('node_modules', '@types', 'testing-library__jest-dom', 'index.d.ts');
const refMatcher = /[\r\n]+\/\/\/ <reference types="jest" \/>/;
fs.readFile(typesPath, 'utf8', (err, data) => {
if (err) throw err;
fs.writeFile(
typesPath,
data.replace(refMatcher, ''),
'utf8',
function(err) {
if (err) throw err;
}
);
});
+1 -2
View File
@@ -8,8 +8,7 @@
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"test": "vitest",
"postinstall": "node ./fix-jest-dom.mjs"
"test": "vitest"
},
"license": "MIT",
"devDependencies": {
-5
View File
@@ -9,11 +9,6 @@ export default defineConfig({
web: [/\.jsx?$/],
},
setupFiles: './setupVitest.js',
// solid needs to be inline to work around
// a resolution issue in vitest:
deps: {
inline: [/solid-js/, /solid-testing-library/],
},
// if you have few tests, try commenting one
// or both out to improve performance:
// threads: false,