Sunday, November 17, 2013

Visual Studio 2013 + Angularjs + JasmineJS + Resharper 7/8 (or Chutzpah)

I recently started a project which used the following technologies: Visual Studio 2013 + Angularjs + JasmineJS + Resharper 7/8 (or Chutzpah).

I was having a rough time getting JasmineJS to work with Resharper/Chutzpah.  The strange thing was that it would work in the specrunner but not in the actual resharper or chutzpah interfaces which directly integrate into Visual Studio (which is what i wanted).

After spending a couple hours of research i came upon this blog: http://microsoftwindowsblogger.blogspot.com/2013/10/best-unit-testing-angularjs-with.html

Basically you have to inject the script references into the unit test files (which i knew) but they must ALSO BE RELATIVE PATHS TO THE TEST FILE!

Here is an example of a working Jasmine Unit Test which integrates angularjs and works with both Chutzpah and Resharper 7+:

5 comments:

  1. Here is yet another sample of AngularJS web app with Jasmine unit tests for Visual Studio (works with Chutzpah test runner):

    AngularJS SPA Template for Visual Studio + Visual Studio Extension

    ReplyDelete
    Replies
    1. My full tech stack at this point is C# + Nhibernate (MSSQL 2012) + Web API v2 + AngularJS including MSTEST (SQLite) + Jasmine. Once i got all the tech talking to each other it has turned out to be very easy to develop enterprise level applications.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Angularjs Online Training Angularjs Training Angularjs Training Angularjs Training in Chennai Angularjs Training in Chennai Angularjs Course Angularjs Course Angular 2 Training in Chennai

    ReplyDelete

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.