Webstorm + Jasmine: Unable to attach test reporter to test framework or test framework quit unexpectedly

Hi,

Try to set up environment in Webstorm to run jasmine testing cases. Basically follow the example : http://blog.jetbrains.com/webide/2011/10/javascript-unit-testing-support/. but use jasmine code instead:

GreeterTest.js:


describe("test", function(){
    it("test1", function(){
        var greeter = new myapp.Greeter();
        assertEquals("Hello World!", greeter.greet("World"));
    });
})



greeter.jstd:

load:
  - ../src/Greeter.js
  - ../test/unit/GreeterTest.js


Then try to run cases. Error message : "Unable to attach test reporter to test framework or test framework quit unexpectedly " is shown.

If change GreeterTest.js to :
TestCase("GreeterTest", {
    "test greet": function() {
        var greeter = new myapp.Greeter();
        assertEquals("Hello World!", greeter.greet("World"));
    },
    "test greet null": function() {
        var greeter = new myapp.Greeter();
        assertNull(greeter.greet(null));
    }
});


Then test cases just run fine. JsTestDriver & jasmineAdapter is installed.

Any help is greatly appreciated. Thanks
2 comments
Comment actions Permalink

Hi frankie,

the problem is that greeter.jstd should reference jasmine.js and JasmineAdapter.js files (note that jasmine.js should precede JasmineAdapter.js in loading order).
See http://confluence.jetbrains.net/download/attachments/41490213/greeter-jasmine.zip as an example of working jasmine tests.

0
Comment actions Permalink

thanks , it helps.

0

Please sign in to leave a comment.