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:

  1. Cannot read property 'ViewModel' of undefined
  2. okay
    Expected:
    "success"
  3. Expected 1 assertions, but 2 were run


Have I set something up wrong?  How do I get the same messages into the Resharper runner?
4 comments
Comment actions Permalink

Is there anything I can add to make this question easier to answer?

0
Comment actions Permalink

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.

0
Comment actions Permalink

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
Expected:
"Dragons the policeman knew were supposed to shoot fire, and occasionally get themselves slaughtered"
Result:
"Your mom is a policeman."
Diff:
"Dragons the policeman knew were supposed to shoot fire, and occasionally get themselves slaughtered" "Your mom is a policeman." 
Source:
    at Object.<anonymous> (http://localhost:9668/Scripts/sampleTest.js:7:2)


Attachment(s):
WebApplication6.zip
0
Comment actions Permalink

Thanks, David!

I made some improvements in this area, will be available in a few days in EAP builds.

0

Please sign in to leave a comment.