workshopper-adventure icon indicating copy to clipboard operation
workshopper-adventure copied to clipboard

Fix verify always failing

Open finnp opened this issue 6 years ago • 1 comments

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...

finnp avatar Jun 20 '18 18:06 finnp

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 😩

martinheidegger avatar Jun 26 '18 02:06 martinheidegger