Kevin Jones
Kevin Jones

Reputation: 2367

Using Resharper test runner with Jasmine 2.0

I'm trying to use the Resharper (v8.2) test runner in VS2013 with Jasmine 2 but I'm having an issue calling a 'global' beforeEach

The spec file has a 'script reference' to a SpecHelper.js that has a call to beforeEach. The SpecHelper code is running but at the time that the SpecHelper is loaded Jasmine has not been loaded so beforeEach is not available.

The code looks like this:

///<reference path="../../../../jasmine/tests/BaseReferences.js"/>

then in the SpecHelper

beforeEach(function() {
    // do stuff here
}

This worked fine with the Jasmine 1.3 runner.

Does anybody know of anyway to fix this? I can't see any way to force Jasmine to load first but I may be missing the option

Upvotes: 3

Views: 3020

Answers (3)

Kevin Jones
Kevin Jones

Reputation: 2367

Turns out this is a bug in the Resharper runner (http://devnet.jetbrains.com/message/5513278#5513278) It will be fixed in 8.2.1

Upvotes: 2

Jason Sylvestre
Jason Sylvestre

Reputation: 11

The only way I could get the sample jasmine spec to work was to paste the code from the SpecHelper directly into the beforeEach.

Upvotes: 0

citizenmatt
citizenmatt

Reputation: 18583

Have you changed the supported version of Jasmine to 2.0 in the ReSharper -> Options -> Unit Testing -> JavaScript page?

Upvotes: 3

Related Questions