Most tests for `add` validator check pass by default
thgaskell opened this issue · 1 comments
thgaskell commented
The validator test for the add
method passes most cases by default since it's checking for the return value to be a string value.
Examples
1 + '' // => "1"
1 + [] // => "1"
1 + {} // => "1[object Object]"
1 + (function () {}) // => "1function () {}"
We might want to fix this by enforcing a specific error string to be returned, or maybe to throw
errors?
jaywon commented
I'm for throwing errors. I think in general throwing critical errors and handling is a good process that we don't explicitly cover as a design concept.