Methods
(static) createRun(fn, options, stateopt) → {module:pete/lib/runner~startRun}
- Description:
Create run function that will call
fn, depending on passed options.
statewill 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:
(static) setOptions(id, options, args) → {function|undefined}
- Description:
Parse options from command line arguments and assign them to
options.
Parseargsintofn,optionsandname- each of them optional.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | |
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 |