fix(client): remove JS comments from user code for tests (#41873)
* Removes comments in js challanges by default * fix local-scope-and-functions test regex * fix all languages * revert language changes * removed unnecessary removeJSComments from challenges * fix challanges in other languages * removed removeJSComments from all challanges
This commit is contained in:
committed by
GitHub
parent
ebe8f99345
commit
db369fbed1
@@ -87,6 +87,7 @@ export function* executeChallengeSaga({
|
||||
const protect = isLoopProtected(challengeMeta);
|
||||
const buildData = yield buildChallengeData(challengeData, {
|
||||
preview: false,
|
||||
removeComments: challengeMeta.removeComments,
|
||||
protect
|
||||
});
|
||||
const document = yield getContext('document');
|
||||
@@ -201,6 +202,7 @@ function* previewChallengeSaga({ flushLogs = true } = {}) {
|
||||
const protect = isLoopProtected(challengeMeta);
|
||||
const buildData = yield buildChallengeData(challengeData, {
|
||||
preview: true,
|
||||
removeComments: challengeMeta.removeComments,
|
||||
protect
|
||||
});
|
||||
// evaluate the user code in the preview frame or in the worker
|
||||
|
Reference in New Issue
Block a user