Skip to content

benchmark: add default value for settings param

Rodrigo Muino Tomonari requested to merge github/fork/xtx1130/benchmark-cli into main

It will cause an error when I try to import _cli.js:

const CLI = require('./benchmark/_cli.js');
const cli = new CLI('');

TypeError: Cannot read properties of undefined (reading 'arrayArgs')
    at new CLI (/Users/didi/Desktop/node/benchmark/_cli.js:28:34)
    at Object.<anonymous> (/Users/didi/Desktop/node/benchmark/test-cli.js:2:13)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
    at Module.load (node:internal/modules/cjs/loader:998:32)
    at Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

So I try to use kEmptyObject as default settings value for benchmark CLI.

Merge request reports

Loading