No message at 10,000ms. Jasmine Karma RequireJSS

I started without much focus in AngularJS. When I run:

.\node_modules\.bin\karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=PhantomJS

      

I receive the following message:

WARN [PhantomJS 1.9.8 (Windows 7 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.

      

I started with an angular-seed project, from there I made adjustments for my needs. I want to use jasmine as a testing framework. So I made my test case based on the current angular-series:

describe('sputnikApp.view1 module', function () {

    beforeEach(module('sputnikApp.view1'));

    describe('view1 controller', function () {

        var scope;

        beforeEach(inject(function($rootScope, $controller) {
            scope = $rootScope.$new();
            $controller('View1Ctrl', {$scope: scope});
        }));

        it("it should have has default selected priority Normal", function() {
            expect(input("select.value1").val()).toBe('2');
        })
    });
});

      

The wait part (input (... I think the input part is part of the jasmine framework. I added jasmine and apparently I had an error because something was not loading. I fixed it by adding RequireJS. Here I am , almost everything I think and test cases don't work.

I give you the repository and travis, it might help.

I suspect it has something to do with RequireJS

I have looked at other questions related to this, but it doesn't work. I think I can have tricky things with requireJS. If I don't need it, I would be better ...

https://github.com/Lorac/sputnik-angularjs

https://travis-ci.org/Lorac/sputnik-angularjs

+3


source to share


2 answers


Rebuild my dependencies + remove requireJS and it works.



0


source


You can set browser timeout in your karma config. I fixed the problem by increasing my timeout to 30000 instead of the default 10000. BrowserNoActivityTimeout is the setting you want in this case, however there are other timeouts that you can change as well:



browserNoActivityTimeout : 60000, //default 10000
browserDisconnectTimeout : 10000, // default 2000
browserDisconnectTolerance : 1, // default 0
captureTimeout: 60000

      

+2


source







All Articles