QUnit Failure Message Less Helpful Than Html Page
When I run a QUnit suite with Resharper 7.0 (vs2010 or 2012) every single failure look like this:
Died on test
Exception doesn't have a stacktrace
Whereas the HTML page is marginally better with something similar to:
- Cannot read property 'ViewModel' of undefined
-
okay
Expected: "success"
- Expected 1 assertions, but 2 were run
Have I set something up wrong? How do I get the same messages into the Resharper runner?
Please sign in to leave a comment.
Is there anything I can add to make this question easier to answer?
Hi David,
it's not always possible to retrieve more info about test failure via QUnit API, but if you could provide a sample of failing tests, I'll try to find a way to extract all available information in given cases.
Great! I've attached a very simple solution and also placed it in dropbox here:
https://www.dropbox.com/s/qacj0tuvtf95zys/WebApplication6.zip
I noticed that running the QUnit test several times yields different results.
At first, resharper wouldn't run the QUnit test at all. It would hang or give the little "inconclusive" yellow icon with the double arrows. Then it ran the test, reporting the correct error message with all the usual information I was hoping for. Then after a bit, it ran, but did not show the error message or information I was hoping for.
Now it consistently shows this:
Was: Your mom is a policeman. expected: Dragons the policeman knew were supposed to shoot fire, and occasionally get themselves slaughtered undefined
Exception doesn't have a stacktrace
Even though running the test using the QUnit test page in the browser shows this:
failed
Attachment(s):
WebApplication6.zip
Thanks, David!
I made some improvements in this area, will be available in a few days in EAP builds.