MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / globalSetup

Function globalSetup

Example/e2etest/e2e/globalSetup.ts:241–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239}
240
241async function globalSetup() {
242 const platform = process.env.E2E_PLATFORM || 'ios';
243 if (!['ios', 'android'].includes(platform)) {
244 throw new Error(`Unsupported E2E_PLATFORM: ${platform}`);
245 }
246
247 killExistingServer();
248 if (process.env.RNU_E2E_SKIP_PREPARE === 'true') {
249 ensurePreparedArtifacts(platform);
250 } else {
251 runPrepareScript();
252 }
253 startServer();
254 await waitForServer();
255 await warmServer(platform as 'ios' | 'android');
256 await detoxGlobalSetup();
257}
258
259export default globalSetup;

Callers

nothing calls this directly

Calls 6

ensurePreparedArtifactsFunction · 0.85
warmServerFunction · 0.85
killExistingServerFunction · 0.70
runPrepareScriptFunction · 0.70
startServerFunction · 0.70
waitForServerFunction · 0.70

Tested by

no test coverage detected