We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afb1a61 commit f70f9acCopy full SHA for f70f9ac
1 file changed
lib/step/func.js
@@ -5,17 +5,21 @@ const store = require('../store')
5
* Function executed as a step
6
*/
7
class FuncStep extends BaseStep {
8
+ // this is actual function that should be executed within step
9
setCallable(fn) {
10
this.fn = fn
11
}
12
13
+ // helper is optional, if we need to allow step to access helper methods
14
setHelper(helper) {
15
this.helper = helper
16
17
18
run() {
19
if (!this.fn) throw new Error('Function is not set')
20
21
+ // we wrap that function to track time and status
22
+ // and disable it in dry run mode
23
this.args = Array.prototype.slice.call(arguments)
24
this.startTime = +Date.now()
25
0 commit comments