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

Function buildChallenge

packages/challenge-builder/src/build.ts:107–117  ·  view source on GitHub ↗
(
  challengeData: BuildChallengeData,
  options: BuildOptions
)

Source from the content-addressed store, hash-verified

105}
106
107export async function buildChallenge(
108 challengeData: BuildChallengeData,
109 options: BuildOptions
110) {
111 const { challengeType } = challengeData;
112 const build = buildFunctions[challengeType];
113 if (build) {
114 return build(challengeData, options);
115 }
116 throw new Error(`Cannot build challenge of type ${challengeType}`);
117}
118
119export const prefixDoctype = ({
120 build,

Callers 2

build.test.tsFile · 0.90
createTestRunnerFunction · 0.85

Calls 1

buildFunction · 0.85

Tested by

no test coverage detected