workshopper-adventure
workshopper-adventure copied to clipboard
Fix verify always failing
I tried to use workshopper-adventure instead of adventure and was running into an issue.
The verify was always failing, because there is a weird check that verify needs to pass, but also exercise.fail
is not allowed to be truthy.
However exercise.fail
is the is the text that's shown when it fails. So it's always truthy...
Thank you for pointing this out!
There is a legacy reason why exercise fail is there.
https://github.com/workshopper/adventure/blob/22dd8b8af46f27f6a7d2f095498170fd1ff676a3/index.js#L223-L227
I vaguely remember that this is because in streaming mode there needs to be a way to set had to set "failed" or not and this.fail = reason
was a way to get that done. I fear the simplicity of this PR while alluring, doesn't quite work. At least not for all the cases. Its one of the conflicting points between Adventure and Workshopper 😩