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

@ -199,7 +199,7 @@
],
"bin": "./script/cli.js",
"scripts": {
"build": "./script/build-dist.sh && ./script/build-module.js",
"build": "./script/build-dist.sh && ./script/build-esm.js",
"build+test": "npm run build && npm run test",
"fuzz": "jazzer ./test/jazzer-fuzz-test.js --sync",
"test": "./script/test-all.sh",

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 => {

File diff suppressed because one or more lines are too long