testdouble / jasmine-before-all

Adds a done-friendly beforeAll global function to Jasmine
5 stars 3 forks source link

Default time out for async not configurable #4

Open develoser opened 8 years ago

develoser commented 8 years ago

Hi there, I'm not able to setup different time out (other than default one, 5 secs.) when using async (done parameter). Tried with variations of:

beforeAll(function (done) {

   setTimeout(done, 6000);

}, 10000);

and:

beforeAll(function (done) {
   var originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
    jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; 
   setTimeout(done, 6000);

});

afterAll(function () {
   jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
});

But it always end up with the following error message:

timeout: timed out after 5000 msec waiting for spec to complete

Any ideas?

Note: The first approach works fine with beforeEach() and afterEach()

searls commented 8 years ago

Hi, I'd encourage you to open a PR if this is a thing supported by Jasmine to make it behave the same.