Open eppfel opened 8 years ago
I ran into this issue as well in exercise 12 (Function Spies). In the solution, the spy
object is expected to have a numeric count
property. I had accidentally named the property counter
instead in my solution. When verifying my solution I got the same error which was a bit confusing.
When testing my faulty solution,
run
andverify
throwError: [sprintf] expecting number but found undefined "undefined"
. This happens, if your module returns anything, but a number, e.g.:Tested
{}
,[]
,''
as well.I was confused first, because the error is thrown inside the workshop script. I think it would be helpful, if a type check was performed to anticipate an error like this. Maybe this is related to other exercises as well.
The full stack: