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

Function _initializeTestRunner

curriculum/src/test/test-challenges.js:485–509  ·  view source on GitHub ↗
({
  build,
  sources,
  type,
  hooks,
  loadEnzyme
})

Source from the content-addressed store, hash-verified

483}
484
485async function _initializeTestRunner({
486 build,
487 sources,
488 type,
489 hooks,
490 loadEnzyme
491}) {
492 const source = type === 'dom' ? prefixDoctype({ build, sources }) : build;
493 await page.evaluate(
494 async (sources, source, type, hooks, loadEnzyme) => {
495 await window.FCCTestRunner.createTestRunner({
496 source,
497 type,
498 code: sources,
499 hooks,
500 loadEnzyme
501 });
502 },
503 sources,
504 source,
505 type,
506 hooks,
507 loadEnzyme
508 );
509}
510
511async function initializeTestRunner({
512 build,

Callers 1

initializeTestRunnerFunction · 0.85

Calls 1

prefixDoctypeFunction · 0.90

Tested by

no test coverage detected