* Configures a helper. * Helper name can be omitted and values will be applied to first helper. * @param {string | Object | ScenarioConfigCallback} helper * @param {Object } [obj] * @returns {this}
(helper, obj)
| 95 | * @returns {this} |
| 96 | */ |
| 97 | config(helper, obj) { |
| 98 | if (!obj) { |
| 99 | obj = helper |
| 100 | helper = 0 |
| 101 | } |
| 102 | if (typeof obj === 'function') { |
| 103 | if (isAsyncFunction(obj)) { |
| 104 | obj(this.test).then(res => (this.test.config[helper] = res)) |
| 105 | return this |
| 106 | } |
| 107 | obj = obj(this.test) |
| 108 | } |
| 109 | |
| 110 | this.test.config[helper] = obj |
| 111 | return this |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Append a tag name to scenario title |
nothing calls this directly
no test coverage detected