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

Method share

lib/container.js:307–318  ·  view source on GitHub ↗

* Share data across worker threads * * @param {Object} data * @param {Object} options - set {local: true} to not share among workers

(data, options = {})

Source from the content-addressed store, hash-verified

305 * @param {Object} options - set {local: true} to not share among workers
306 */
307 static share(data, options = {}) {
308 // Instead of using append which replaces the entire container,
309 // directly update the support object to maintain proxy references
310 Object.assign(container.support, data)
311
312 // Track which keys were explicitly shared
313 Object.keys(data).forEach(key => container.sharedKeys.add(key))
314
315 if (!options.local) {
316 WorkerStorage.share(data)
317 }
318 }
319
320 static createMocha(config = {}, opts = {}) {
321 const mochaConfig = config?.mocha || {}

Callers 1

Calls 1

addMethod · 0.45

Tested by

no test coverage detected