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

Method create

lib/config.js:69–77  ·  view source on GitHub ↗

* Create a config with default options * * @param {*} newConfig * @return {Object }

(newConfig)

Source from the content-addressed store, hash-verified

67 * @return {Object<string, *>}
68 */
69 static create(newConfig) {
70 config = deepMerge(deepClone(defaultConfig), newConfig)
71 // Re-apply every hook against the freshly built config; hooks added later
72 // (e.g. from plugin boot) stay pending until runPendingHooks. Array
73 // iterators re-check length on each step, so hooks pushed during a hook
74 // execution are visited in this same pass.
75 for (const hook of hooks) applyHook(hook, config)
76 return config
77 }
78
79 /**
80 * Load config from a file.

Callers 4

constructorMethod · 0.45
initMethod · 0.45
loadConfigFileFunction · 0.45
convertToMochaTestsFunction · 0.45

Calls 2

deepMergeFunction · 0.90
applyHookFunction · 0.85

Tested by

no test coverage detected