Reputation: 3571
Here is the test:
myview-model.specs.js
:
describe('Total truth', function() {
it('true', function() {
expect(true).toBe(true);
});
});
When I run Resharper 9 it fails with "Inconclusive: Test not run" for Total truth
when it is with phantomjs.exe
Upvotes: 5
Views: 2380
Reputation: 585
As for the begining tests should not fail through cli. Debug first test with grunt cli if you got errors with tests.
Topic problem was solved that way:
Add /// <reference paths to the spec.js. (tests.js)
/// <reference path="~/Views/angular.js"/> /// <reference path="~/Views/angular-mocks.js"/> /// <reference path="~/../OtherProject/frontend/core/myController.ctrl.js"/> describe('app.core.myControllerCtrl', function () {
Disable QUnit. QUnit runner tries to make tests from angular-mock.module function. (RESHARPER->Options->Tools->Unit Testing->JavaScript Tests->Supported Frameworks)
Run your tests via ReSharper.
As for the myController.ctrl.js - it is linked at the BrOtherProject but you may need to link it same as angular library.
Bad references are highlited at the editor. Suggestions are available only for the project scope.
By the way Resharper starts local server and opens browser page. You may track page console errors at the browser-dev to figure out which dependency was broken.
Tests may be run with phantom. You should configure it at ReSharper options. Phantom may be needed for CI build-server either. You may figure out some usefull cofigurations here.
Upvotes: 0
Reputation: 3571
In case someone comes here the problem was not in Visual Studio or Resharper but the phantomjs had an error:
> C:\PhantomJS\bin\phantomjs.exe
Auto configuration failed
11888:error:02001015:system library:fopen:Is a directory:.\crypto\bio\bss_file.c:169:fopen('F:\development\openssl\!BUILD/ssl/openssl.cnf','rb')
11888:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c:174:
11888:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\conf\conf_def.c:199:
So after pointing to correct phantomjs it works.
Upvotes: 1