fix(learn): on user code execution error, run tests anyway

This commit is contained in:
Valeriy S
2019-01-15 18:27:30 +03:00
committed by Stuart Taylor
parent e063686fca
commit 3d008c69d7
3 changed files with 19 additions and 6 deletions

View File

@ -320,13 +320,12 @@ async function evaluateJsTest({ solution, files, test }) {
const { build, sources } = await buildJSChallenge(files);
const code = sources && 'index' in sources ? sources['index'] : '';
const script = build + '\n' + test.testString;
const testWorker = createWorker('test-evaluator');
try {
const { pass, err } = await testWorker.execute(
{ script, code, sources },
{ testString: test.testString, build, code, sources },
5000
);
if (!pass) {