You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed by experimenting that if you provide a CoffeeScript class instead of a string as a first param of describe (although it's not supposed to be supported! But I'm new to this, so please bear with me), going to the browser at /jasmine will happily report failures properly (just with an empty description), while guard-jasmine will choke on the JSON parsing, and only when errors happen.
Here's an example json (trimmed down):
{
"passed": false,
"stats": {
"failures": 1,
"specs": 7,
"time": 0.017
},
"suites": [
{
## missing description key here, which I suspect leads to the exception ##"passed": false,
"specs": [
{
"description": "excludes that",
"messages": [
"Expected 5 to equal 4."
],
"passed": false
}
],
"suites": []
},
{
"description": "A string is passed here and this one works ok",
"passed": true,
"specs": [
...
],
"suites": []
}
]
}
This only happens when you have failures in the specs.
Suggestion: we could maybe default to an empty description instead of this exception, to be consistent with the behaviour seen in the browser?
What do you think?
The text was updated successfully, but these errors were encountered:
Just did a quick check in two projects of mine that are using guard-jasmine and if I use a CoffeeScript class as description in the describe function, then the Jasmine HTML runner fails with 'Uncaught Error: NOT_FOUND_ERR: DOM Exception 8' and the Guard Jasmine runner fails with a timeout ('ERROR: An error occurred: Timeout waiting for the Jasmine test results!').
Even when it would behave like you've described, I'm not sure if it's a good idea to catch the missing description, because it's a wrong usage of Jasmine. But on the other side, it doesn't harm and may help, so why not?
I noticed by experimenting that if you provide a CoffeeScript class instead of a string as a first param of describe (although it's not supposed to be supported! But I'm new to this, so please bear with me), going to the browser at /jasmine will happily report failures properly (just with an empty description), while guard-jasmine will choke on the JSON parsing, and only when errors happen.
Here's an example json (trimmed down):
This only happens when you have failures in the specs.
Suggestion: we could maybe default to an empty description instead of this exception, to be consistent with the behaviour seen in the browser?
What do you think?
The text was updated successfully, but these errors were encountered: