busterjs / buster

Abandoned - A powerful suite of automated test tools for JavaScript.
http://docs.busterjs.org
Other
448 stars 37 forks source link

Exception printing for plain strings prints "undefined" #418

Open augustl opened 10 years ago

augustl commented 10 years ago

If a test or implementation does this:

throw new Error("Hello, world");

The reporters will print:

"Error: Hello, world"

If a test or implementation does this:

throw "Hello, world";

The reporters will print (in the same color as the error above):

undefined
dominykas commented 9 years ago

Should you even be throwing strings around?

dwittner commented 9 years ago

Maybe not, but you can. Thus we should be able to handle that, in my opinon. A colored output of "undefined" feels like a bug.