(conf)
| 31 | const bench = common.createBenchmark(main, configs, options); |
| 32 | |
| 33 | function main(conf) { |
| 34 | const { defaultResolve } = require('internal/modules/esm/resolve'); |
| 35 | tmpdir.refresh(); |
| 36 | |
| 37 | fs.mkdirSync(path.join(benchmarkDirectory, 'node_modules', 'unprefixed-existing'), { recursive: true }); |
| 38 | fs.writeFileSync(path.join(benchmarkDirectory, 'node_modules', 'unprefixed-existing', 'index.js'), '\n'); |
| 39 | fs.writeFileSync(path.join(benchmarkDirectory, 'relative-existing.js'), '\n'); |
| 40 | |
| 41 | bench.start(); |
| 42 | |
| 43 | for (let i = 0; i < conf.n; i++) { |
| 44 | try { |
| 45 | defaultResolve(conf.specifier, { parentURL }); |
| 46 | } catch { /* empty */ } |
| 47 | } |
| 48 | |
| 49 | bench.end(conf.n); |
| 50 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…