As for the initial tests, this should not fail through cli. Refuse the first test with grunt cli if you receive errors with tests.
The topic issue was resolved this way:
- Add angular and other libraries to your C # project (itβs preferable to link Add-> Existing Item-> Pick β (small down arrow) β Add as link). E.g. I added to the views folder from the npm module folder outside the project.
- Add the nuget JasmineTest package (Jasmine Test Framework).
- Add the System.Web.Mvc link. (4.0.0 works great)
Add /// < s reference path to 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 is trying to run tests from the angular -mock.module function. (RESHARPER-> Options-> Tools-> Unit Testing-> JavaScript Tests-> Supported Framework)
Run your tests through ReSharper.
As for myController.ctrl.js - it is related to BrOtherProject, but you may need to link it in the same way as the angular library.
Bad links posted in the editor. Offers are available only for the project area.
By the way, Resharper starts a local server and opens a browser page. You can track errors on a page in browser-dev to find out which dependency has been broken.
Tests can be performed with phantom. You must configure it in the ReSharper options. Phantom may be needed for the CI build server. You can find some useful configurations here .
source share