theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 310 forks source link

Improve the stack trace for a SyntaxError in a test #592

Closed sholladay closed 4 years ago

sholladay commented 8 years ago

The stack trace currently provided when there is a simple SyntaxError in a test is ... less than ideal.

The situation with displayErrors being undocumented has changed. It is now a fully supported part of the API. Intern should use it to provide the place in the code where the SyntaxError lives.

Edit: displayErrors is true by default, actually. So the output must be truncated somewhere.

jason0x43 commented 8 years ago

This should probably be an upstream enhancement request, either for https://github.com/dojo/dojo2 (which is what Intern uses now) or https://github.com/dojo/loader (which is what Intern will likely switch to at some point), or both, since that's where runInThisContext is actually called.

tomdye commented 8 years ago

@kitsonk @jason0x43 Have updated in the dojo/loader issue, looks like intern is truncating the output somewhere thus it is not an upstream bug

jason0x43 commented 4 years ago

Closing this since it's for Intern 3 and an older dojo