Getting started with Karma and Jasmine installed - jasmine.Suite() required error

I'm trying to get started with karma and jasmine.

I've installed them both. I believe that Karma can locate my JavaScript files. When I run karma start, my browsers open and state:

Karma v0.12.23 - connected
IE 11.0.0 (Windows 8.1) is idle
Firefox 29.0.0 (Windows 8.1) is idle
Chrome 37.0.2062 (Windows 8.1) is idle

I added a JavaScript file to a location that I thought Karma was monitoring:

it('y should have a length of 1', function () {
    var y = '1';

Where would I look to see the unit test fail?

If I open resharper in vs2013, I see the unit test. When I go to run it, a new browser window opens, and it's blank. The console does show on this page:

ncaught Error: jasmine.Suite() required 

How do I get it to pick up my test?


As described in the Jasmine nomenclature a suite

Suites: describe Your Tests

A test suite begins with a call to the global Jasmine function describe with two parameters: a string and a function. The string is a name or title for a spec suite – usually what is being tested. The function is a block of code that implements the suite.

So I guess you have to wrap your test in a describe statement

describe('my test suite',function(){

    it('my test case',function(){
        //some assertions

Need Your Help

Reading Recommendations To Learn Basics Of C

c function

I'm now really diving into my OS project, called ForestOS, but now I'm needing to dive more into some simple and basic things of C. As now I'm having many problems with the correct variable to use ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.