MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / config

Method config

lib/mocha/scenarioConfig.js:97–112  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

isAsyncFunctionFunction · 0.90

Tested by

no test coverage detected