// Resolve the repository's unmodified H5 browser tests against this project's // local Playwright installation, instead of requiring a global npm install. const cp = require('node:child_process'), path = require('node:path'); const original = cp.execSync; cp.execSync = function (command, options) { if (command === 'npm root -g') { const value = path.resolve(__dirname, '../node_modules') + '\n'; return options && options.encoding ? value : Buffer.from(value); } return original.apply(this, arguments); }; require('node:module').syncBuiltinESMExports();