mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-10 13:00:59 -04:00
fix: run tests in iife to avoid name conflicts (#58805)
This commit is contained in:
committed by
GitHub
parent
ceb0e60460
commit
1aeb65b445
@@ -132,7 +132,7 @@ ctx.onmessage = async (e: TestEvaluatorEvent) => {
|
||||
__utils.flushLogs();
|
||||
__userCodeWasExecuted = true;
|
||||
__utils.toggleProxyLogger(true);
|
||||
${e.data.testString}`)) as unknown;
|
||||
(async () => {${e.data.testString}})()`)) as unknown;
|
||||
} catch (err) {
|
||||
if (__userCodeWasExecuted) {
|
||||
// rethrow error, since test failed.
|
||||
|
||||
Reference in New Issue
Block a user