MCPcopy Index your code
hub / github.com/darkreader/darkreader / setup

Method setup

tests/browser/environment.js:24–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 messageServer;
23
24 async setup() {
25 await super.setup();
26
27 const promises1 = [
28 this.createMessageServer(),
29 this.launchBrowser(),
30 ];
31 const promises2 = [
32 createTestServer(TEST_SERVER_PORT),
33 createTestServer(CORS_SERVER_PORT),
34 ];
35
36 const results1 = await Promise.all(promises1);
37 this.messageServer = results1[0];
38 this.browser = results1[1];
39
40 promises2.push(
41 this.createTestPage(),
42 );
43
44 const results2 = await Promise.all(promises2);
45 this.testServer = results2[0];
46 this.corsServer = results2[1];
47 this.page = results2[2];
48
49 // Wait for tabs to load?
50
51 this.assignTestGlobals(this.global, this.testServer, this.corsServer, this.page);
52 }
53
54 /**
55 * @returns {Promise<void>}

Callers

nothing calls this directly

Calls 6

createMessageServerMethod · 0.95
launchBrowserMethod · 0.95
createTestPageMethod · 0.95
assignTestGlobalsMethod · 0.95
createTestServerFunction · 0.90
allMethod · 0.80

Tested by

no test coverage detected