* Determines if the task should run when it's triggered because of a * host update, and runs the task if it should. * * A task should run when its arguments change from the previous run, based on * the args equality function. * * This method is side-effectful: it stores the new arg
()
| 289 | * This method is side-effectful: it stores the new args as the previous args. |
| 290 | */ |
| 291 | private async _performTask() { |
| 292 | const args = this._getArgs(); |
| 293 | const prev = this._previousArgs; |
| 294 | this._previousArgs = args; |
| 295 | if ( |
| 296 | args !== prev && |
| 297 | args !== undefined && |
| 298 | (prev === undefined || !this._argsEqual(prev, args)) |
| 299 | ) { |
| 300 | await this.run(args); |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Runs a task manually. |
no test coverage detected