MCPcopy
hub / github.com/codeceptjs/CodeceptJS / setContextTranslation

Function setContextTranslation

lib/mocha/ui.js:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12import store from '../store.js'
13
14const setContextTranslation = context => {
15 if (!container) return
16
17 const translation = container.translation?.() || container.translation
18 const contexts = translation?.value?.('contexts')
19
20 if (contexts) {
21 for (const key of Object.keys(contexts)) {
22 if (context[key]) {
23 context[contexts[key]] = context[key]
24 }
25 }
26 }
27}
28
29/**
30 * Codecept-style interface:

Callers 1

ui.jsFile · 0.85

Calls 2

translationMethod · 0.80
valueMethod · 0.80

Tested by

no test coverage detected