0

I want to debug a JavaScript Unit Test inside jasmine 2.0 within Resharper 8, i.e. I want the test to pause so I can open the Chrome debugger to look at variables etc. There is an stackoverflow answer for Jasmine 1.3 given here, but this does not work in jasmine 2.0.

Anyone got a suggestion?

Community
  • 1
  • 1
Jon P Smith
  • 2,391
  • 1
  • 30
  • 55

1 Answers1

3

I have found one way to stop a Jasmine 2.0 Unit Test returning to Resharper. Whether its the best way I don't know, but it works. Include the line below in the test you don't want to complete.

ReSharperReporter.prototype.jasmineDone = function () { }; 

You will need to press stop on Resharper Unit Test page to stop the test.

I should say that doing this doesn't stop the Jasmine test finishing, so you don't have access to any locals inside the test. I have voted up this issue on the Resharper web site as there has to be a better solution. If you have this problem then I suggest you vote this up too.

Jon P Smith
  • 2,391
  • 1
  • 30
  • 55
  • Jon - note that the R# issue you mention has now been closed as a duplicate for this: https://youtrack.jetbrains.com/issue/RSRP-286219 – Sean Kearon Oct 19 '14 at 06:54