fix: allow log in testString, restrict test errors

Console logs from testString get reported and test errors are sent to
the dev console (JS).

challenge building is only attempted if there is a build function to do
so.

Various functions have been renamed to better reflect what they do.
This commit is contained in:
Oliver Eyton-Williams
2019-11-19 12:46:48 +01:00
committed by mrugesh
parent 9194b7731b
commit febba792e7
4 changed files with 32 additions and 22 deletions

View File

@@ -71,6 +71,11 @@ const buildFunctions = {
[challengeTypes.backEndProject]: buildBackendChallenge
};
export function canBuildChallenge(challengeData) {
const { challengeType } = challengeData;
return buildFunctions.hasOwnProperty(challengeType);
}
export async function buildChallenge(challengeData) {
const { challengeType } = challengeData;
let build = buildFunctions[challengeType];