* @param {...any} args * @return {*}
()
| 15 | * @return {*} |
| 16 | */ |
| 17 | run() { |
| 18 | this.args = Array.prototype.slice.call(arguments) |
| 19 | this.startTime = +Date.now() |
| 20 | |
| 21 | if (store.dryRun) { |
| 22 | this.setStatus('success') |
| 23 | return Promise.resolve(new Proxy({}, dryRunResolver())) |
| 24 | } |
| 25 | let result |
| 26 | try { |
| 27 | if (this.helperMethod !== 'say') { |
| 28 | result = this.helper[this.helperMethod].apply(this.helper, this.args) |
| 29 | } |
| 30 | this.setStatus('success') |
| 31 | this.endTime = +Date.now() |
| 32 | } catch (err) { |
| 33 | this.endTime = +Date.now() |
| 34 | this.setStatus('failed') |
| 35 | throw err |
| 36 | } |
| 37 | return result |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | export default HelperStep |
nothing calls this directly
no test coverage detected