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

Function initMochaGlobals

lib/globals.js:92–107  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

90 * Called from mocha/ui.js pre-require event
91 */
92export function initMochaGlobals(context) {
93 if (store.noGlobals) return;
94
95 // Mocha test framework globals
96 global.BeforeAll = context.BeforeAll
97 global.AfterAll = context.AfterAll
98 global.Feature = context.Feature
99 global.xFeature = context.xFeature
100 global.BeforeSuite = context.BeforeSuite
101 global.AfterSuite = context.AfterSuite
102 global.Background = context.Background
103 global.Before = context.Before
104 global.After = context.After
105 global.Scenario = context.Scenario
106 global.xScenario = context.xScenario
107}
108
109/**
110 * Clear all CodeceptJS globals (useful for testing/cleanup)

Callers 2

ui.jsFile · 0.90
createMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected