()
| 41 | } |
| 42 | |
| 43 | async run() { |
| 44 | // Get check as synchronous or asynchronous function |
| 45 | const check = Utils.isPromise(this.check) ? await this.check : this.check; |
| 46 | |
| 47 | // Run check |
| 48 | try { |
| 49 | check(); |
| 50 | this._checkState = CheckState.success; |
| 51 | } catch (e) { |
| 52 | this.stateFailError = e; |
| 53 | this._checkState = CheckState.fail; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Validates the constructor parameters. |
no test coverage detected