In the Expenses exercise, the last function to implement display an example of the error message containing the missing category name:
// => 0, error(unknown category entertainment)
The test suite is not validating the content of the error message at all, only that an error is return (!= nil). I would suggest to either change the test suite to validate the content of the message or change the instruction to not output the category name.
For the 1st option, I already did a PR to add this more detailed test:
I understand that making the test validate the error string will make most of existing solutions to fail. So, I do not know what approach you usually take for such a case.
thanks for pointing this out! In concept exercises, we focus very much on teaching a single concept and support that with tests. This exercise has a document, showing the intended focus: First class functions.
So I think testing for specific error messages is distracting from the learning objective and should not be done here.
PS: I am no Go track maintainer, and have no opinion about testing for error messages in practice exercises on the Go track.