js-vitest template

small update for fix-jest-dom
This commit is contained in:
Alex Lohr
2022-03-14 21:39:38 +01:00
parent a29501c437
commit 5930402172
13 changed files with 1942 additions and 9 deletions
+18
View File
@@ -0,0 +1,18 @@
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;
}
);
});