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
Looking around I found that the json response 'errors' have the 'trace' property wrapped around a array, so when method report_spec_errors is called in the line
Formatter.spec_failed(indent(" ➜ Exception: #{error['msg']} in #{error['trace']['file']} on line #{error['trace']['line']}",level))
a exception is raised cause error['trace'] is a array not a hash, and the paramenter for method [] needs to be a Integer, I solved it forcing the first element with [0]
Formatter.spec_failed(indent(" ➜ Exception: #{error['msg']} in #{error['trace'][0]['file']} on line #{error['trace'][0]['line']}",level))
Here is a fragment of my json response
"errors":[{"msg":"TypeError: Fake XHR onreadystatechange handler threw exception: 'undefined' is not a function",
"trace":[{"file":"http://localhost:8888/assets/sinon.js?body=1","function":"","line":567}]},
{"msg":"TypeError: Fake XHR onreadystatechange handler threw exception: 'undefined' is not a function",
"trace":[{"file":"http://localhost:8888/assets/sinon.js?body=1","function":"","line":567}]},
{"msg":"TypeError: Fake XHR onreadystatechange handler threw exception: 'undefined' is not a function",
"trace":[{"file":"http://localhost:8888/assets/sinon.js?body=1","function":"","line":567}]}]
The text was updated successfully, but these errors were encountered:
Oh what a stupid mistake, I used a wrong JSON response for developing this feature, wrong spec == wrong impl :P Thanks for reporting. I'll have a look at it...
Looking around I found that the json response 'errors' have the 'trace' property wrapped around a array, so when method report_spec_errors is called in the line
a exception is raised cause error['trace'] is a array not a hash, and the paramenter for method [] needs to be a Integer, I solved it forcing the first element with [0]
Here is a fragment of my json response
The text was updated successfully, but these errors were encountered: