fix: report errors thrown after the frame is ready

Certain challenges involve code that is not run until the user
interacts with the preview (typically via a click listener). This uses
consoleProxy to report those errors.

Error logging has been simplified, reducing the number of places errors
can be reported from.

Some of the redux-saga code has been renamed in an attempt to improve
clarity.
This commit is contained in:
Oliver Eyton-Williams
2019-11-07 14:35:17 +01:00
committed by mrugesh
parent 04d2de96df
commit beecb04c1a
5 changed files with 77 additions and 40 deletions

View File

@@ -85,7 +85,7 @@ const testRunners = {
[challengeTypes.html]: getDOMTestRunner,
[challengeTypes.backend]: getDOMTestRunner
};
export function getTestRunner(buildData, proxyLogger, document) {
export function getTestRunner(buildData, { proxyLogger }, document) {
const { challengeType } = buildData;
const testRunner = testRunners[challengeType];
if (testRunner) {