Вопрос

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

Это было полезно?

Решение 2

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

Другие советы

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

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top