MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / createAndVisitNewPage

Function createAndVisitNewPage

curriculum/src/test/test-challenges.js:75–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73const poolId = process.env.VITEST_POOL_ID;
74
75async function createAndVisitNewPage() {
76 const page = await globalThis.puppeteerBrowserContext[poolId].newPage();
77 await page.goto(`http://127.0.0.1:8080/index.html`);
78 return page;
79}
80
81async function newPageContext() {
82 // Reuse a single page per worker/pool to avoid the overhead of creating a

Callers 2

newPageContextFunction · 0.85
initializeTestRunnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected