setFixtures не определено: тесты Jasmine не выполняются при запуске Resharper, но не Chutzpah

При запуске тестов Jasmine из Resharper я получаю следующую ошибку для всех тестов, однако те же тесты успешно выполняются при запуске непосредственно из расширения Chutzpah в Visual Studio.

Jasmine 2.0.0
finished in 0.106s
10 specs, 10 failures
Spec List | Failures
UI.tools Tests (name)
ReferenceError: setFixtures is not defined
ReferenceError: setFixtures is not defined
    at Object.<anonymous> (http://localhost:16026/Tests.js:19:9)
    at attemptSync (http://localhost:16026/jasmine.js:1510:12)
    at QueueRunner.run (http://localhost:16026/jasmine.js:1498:9)
    at QueueRunner.execute (http://localhost:16026/jasmine.js:1485:10)
    at Spec.Env.queueRunnerFactory (http://localhost:16026/jasmine.js:518:35)
    at Spec.execute (http://localhost:16026/jasmine.js:306:10)
    at Object.<anonymous> (http://localhost:16026/jasmine.js:1708:37)
    at attemptAsync (http://localhost:16026/jasmine.js:1520:12)
    at QueueRunner.run (http://localhost:16026/jasmine.js:1496:16)
    at QueueRunner.execute (http://localhost:16026/jasmine.js:1485:10)
Expected 0 to be 1.
Error: Expected 0 to be 1.
    at stack (http://localhost:16026/jasmine.js:1293:17)
    at buildExpectationResult (http://localhost:16026/jasmine.js:1270:14)
    at Spec.Env.expectationResultFactory (http://localhost:16026/jasmine.js:484:18)
    at Spec.addExpectationResult (http://localhost:16026/jasmine.js:260:46)
    at Expectation.addExpectationResult (http://localhost:16026/jasmine.js:442:21)
    at Expectation.toBe (http://localhost:16026/jasmine.js:1209:12)
    at Object.<anonymous> (http://localhost:16026/Tests.js:34:68)
    at attemptSync (http://localhost:16026/jasmine.js:1510:12)
    at QueueRunner.run (http://localhost:16026/jasmine.js:1498:9)
    at QueueRunner.execute (http://localhost:16026/jasmine.js:1485:10)

1 ответ

Решение

Версия tl;dr - я обновил Resharper, и теперь он работает.

Я нашел проблему с охотой. Прочитав этот вопрос, я пошел и проверил источник страницы, которую генерировал R#, и, конечно же, пока jasmine.js а также jasmine.css загружались до моих ссылок, resharper-utils.js, jasmine2ResharperReporter.js, jasmine-html.js а также boot.js были загружены после. Большинство из них динамически генерируются инструментом, поэтому ручная ссылка на них, кажется, была неправильной вещью.

Я еще немного посмотрел, и оказалось, что в Resharper 8.2.0 есть ошибка - все, что мне нужно было, - это обновить его до более новой версии (8.2.1+), и проблема была исправлена.

Другие вопросы по тегам