Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

Exception printing for plain strings prints "undefined" #418

Open
augustl opened this issue Jul 30, 2014 · 2 comments
Open

Exception printing for plain strings prints "undefined" #418

augustl opened this issue Jul 30, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@augustl
Copy link
Member

augustl commented Jul 30, 2014

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
@dwittner dwittner added the Bug label Sep 21, 2014
@dwittner dwittner self-assigned this Sep 21, 2014
@dominykas
Copy link
Member

Should you even be throwing strings around?

@dwittner
Copy link
Member

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.

@dwittner dwittner added this to the 1.0 release milestone Jul 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants