Open JimLynchCodes opened 8 years ago
Yeah, I agree, this would be a nice enhancement. At first I was thinking there would be trickiness since the test runner only knows about the current state (not the progression to get there). For example, if you solve through 7 koans, and then go back and break something in the second koan, what should the message be?
But after thinking more about it, I think it's totally fine. We just print out a happy message about the last passing koan - the one right before the first failing one that we currently print an error on. So every time except for the very first koan, you'd see a success message.
For anyone who wants to tackle this, the code in question is in the functional-koans/clojure-koan-engine project. There will be a bit of implementation trickiness in finding information about the passing test before the first failure - might need to pass an atom around to track state? Or maybe there's a nice functional solution.
First of all, this whole project is really awesome. I'm still a beginner with using clojure, and I'm still on the early stages of these koans. It's great though.
There's just something I don't like about how once I get one koan right, there is no indication that it's right other than a different looking error. I just feel like I really have to squint to read the error and then think about it and then it's like ok, that last answer was actually right.
Idk. It would be nice to have some type of reward, high five, positive reinforcement type thing so I can pause and do a celebration and then start with the next failing test. Some kind of hook maybe that prints out a message the first time a test is passed. Just an idea.