ptomato / jasmine-gjs

Jasmine for GJS
MIT License
20 stars 8 forks source link

Error message is unhelpful when suite import fails #13

Closed ptomato closed 4 years ago

ptomato commented 9 years ago

If you have a test suite that can't be imported, for example because of a syntax error, then the error message you get is quite unhelpful:

Exception occurred inside Jasmine:
SyntaxError: syntax error
Jasmine<.loadSpecs/<@/path/to/jasmine-gjs/jasmineBoot.js:119
Jasmine<.loadSpecs@/path/to/jasmine-gjs/jasmineBoot.js:115
wrapper@resource:///org/gnome/gjs/modules/lang.js:178
Jasmine<.execute@/path/to/jasmine-gjs/jasmineBoot.js:128
wrapper@resource:///org/gnome/gjs/modules/lang.js:178
run/<@/path/to/jasmine-gjs/command.js:227
run@resource:///org/gnome/gjs/modules/mainloop.js:33
run@/path/to/jasmine-gjs/command.js:243
@/path/to/jasmine:50

Notice that it doesn't tell you which file the syntax error is in; the error is thrown from the import statement. This should produce a better error message which tells you which file failed to import, and ideally even continues with the rest of the test suites while registering a failure for the problematic one.

ptomato commented 8 years ago

This may be a limitation in GJS.