pete/lib/runner

Methods

(static) createRun(fn, options, stateopt) → {module:pete/lib/runner~startRun}

Description:
  • Create run function that will call fn, depending on passed options.
    state will be updated by the run function with benchmark scores.

Source:
Parameters:
Name Type Attributes Description
fn function | string

either a Function or a path to script

options object
state object <optional>
Returns:
Type
module:pete/lib/runner~startRun

(static) setOptions(id, options, args) → {function|undefined}

Description:
  • Parse options from command line arguments and assign them to options.
    Parse args into fn, options and name - each of them optional.

Source:
Parameters:
Name Type Description
id string

see module:pete/lib/createId

options module:pete/lib/RunOptions

target options object that will be changed

args Array.<any>

arguments passed caller function

Returns:

if any was passed through the args

Type
function | undefined

Type Definitions

run(report)

Description:
  • Run and report.

Source:
Parameters:
Name Type Description
report module:pete/lib/getReporters~report

startRun(mode, report)

Description:
  • Resets state, reports error if any.
    Starts running test function if there were no errors.
    Reports results after run is finished.

Source:
Parameters:
Name Type Description
mode string
report module:pete/lib/getReporters~report