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

Method runPendingHooks

lib/config.js:163–171  ·  view source on GitHub ↗

* Run every hook that hasn't been applied to the current config yet. * Hooks added after `Config.create()` (e.g. from plugin boot code) stay * pending until this is called; once it runs, they're marked applied so * subsequent calls are no-ops. Hooks added while pending hooks are running

(cfg = config)

Source from the content-addressed store, hash-verified

161 * @return {boolean} true if any hook ran
162 */
163 static runPendingHooks(cfg = config) {
164 let ran = false
165 for (const hook of hooks) {
166 if (hook.ran) continue
167 applyHook(hook, cfg)
168 ran = true
169 }
170 return ran
171 }
172
173 /**
174 * Number of registered config hooks. Useful for snapshotting before a phase

Callers 1

createMethod · 0.80

Calls 1

applyHookFunction · 0.85

Tested by

no test coverage detected