Commit 10ce59e1 authored by Jakob Moser's avatar Jakob Moser
Browse files

Make onVerifiying work

parent d35fe29f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ export class Exercise {
     * @param {Function} handler Function with no parameter
     */
    onVerifiying(handler) {
        // TODO
        this.#context._verifyingHandler = handler
    }

    /**
@@ -133,6 +133,7 @@ class ExerciseExecutionContext {
    constructor() {
        this._describeHandler = null
        this._verifyHandler = null
        this._verifyingHandler = null
        this._confirmExerciseCompletion = null
    }

@@ -210,7 +211,10 @@ class ExerciseExecutionContext {
     */
    manualConfirmation() {
        return new Promise((resolve, _) => {
            this._confirmExerciseCompletion = resolve
            this._confirmExerciseCompletion = () => {
                this._verifyingHandler()
                resolve()
            }
        })
    }

@@ -322,6 +326,7 @@ class ExerciseRetryExecutionContext extends ExerciseExecutionContext {
        super()
        this._describeHandler = oldContext._describeHandler
        this._verifyHandler = oldContext._verifyHandler
        this._verifyingHandler = oldContext._verifyingHandler
    }

    describe() {}