Update playwright test

This commit is contained in:
Faisal Salman
2024-06-16 14:02:30 +07:00
parent 4fa991be16
commit f24e4acae2
3 changed files with 102 additions and 54 deletions

View File

@@ -7,7 +7,7 @@ const generateMJS = (module) => {
let text = fs.readFileSync(src, 'utf-8');
replacements.push(
[/const (.+?)\s*=\s*require\((.+)\)/ig, 'import $1 from $2'],
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2.mjs\''],
[/module\.exports =/ig, 'export']
);
replacements.forEach(rep => {