feat: make editable code available in tests

This commit is contained in:
Oliver Eyton-Williams
2020-07-15 11:28:20 +02:00
committed by Mrugesh Mohapatra
parent 6e091a7cdb
commit 68b223322f
9 changed files with 120 additions and 30 deletions

View File

@ -432,7 +432,10 @@ async function createTestRunner(challenge, solution, buildChallenge) {
required,
template
});
const code = sources && 'index' in sources ? sources['index'] : '';
const code = {
contents: sources.index,
editableContents: sources.editableContents
};
const evaluator = await (buildChallenge === buildDOMChallenge
? getContextEvaluator(build, sources, code, loadEnzyme)