Skip to content

Commit f70f9ac

Browse files
author
DavertMik
committed
added comment for fn step class
1 parent afb1a61 commit f70f9ac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/step/func.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ const store = require('../store')
55
* Function executed as a step
66
*/
77
class FuncStep extends BaseStep {
8+
// this is actual function that should be executed within step
89
setCallable(fn) {
910
this.fn = fn
1011
}
1112

13+
// helper is optional, if we need to allow step to access helper methods
1214
setHelper(helper) {
1315
this.helper = helper
1416
}
1517

1618
run() {
1719
if (!this.fn) throw new Error('Function is not set')
1820

21+
// we wrap that function to track time and status
22+
// and disable it in dry run mode
1923
this.args = Array.prototype.slice.call(arguments)
2024
this.startTime = +Date.now()
2125

0 commit comments

Comments
 (0)