Commit c628b323 authored by Jakob Moser's avatar Jakob Moser
Browse files

Make most runCommand calls async

parent 969ce409
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -154,13 +154,13 @@ class ExerciseExecutionContext {
    prepareWith(command, keepVisible) {
        return new Promise((resolve, _) => {

            function prepareAndResolve() {
            async function prepareAndResolve() {
                // Actually prepare and resolve the promise (we get the resolve() function via the closure)
                if(command !== null) {
                    runCommand(command)
                    await runCommand(command)
                }
                if (!keepVisible) {
                    runCommand("clear")
                    await runCommand("clear")
                }
                resolve()
            }
@@ -229,6 +229,7 @@ class ExerciseExecutionContext {
     */
    verify(command) {
        if(command) {
            // TODO await this, and maybe then remove the timout below
            runCommand(command)
        }
        const verifyHandler = this._verifyHandler