user1873073
user1873073

Reputation: 3660

How do you prevent Jasmine from timing out

I'm using Jasmine 2.0. I register an event handler, and wait for it to fire so I can do my test:

$(document).on("pagechange", function() { expect(1).toBe(1); /* times out before it can evaluate this */ });
pageChanger.change("awesome page"); // is async, gets new page from server, fires pagechange when done

but Jasmine reports a failure after a few seconds. Is there a way to do something like:

jasmine.globalTimeout = 1000 * 60;

Upvotes: 0

Views: 43

Answers (1)

user1873073
user1873073

Reputation: 3660

nm, i found it:

jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60;

enter image description here

Upvotes: 1

Related Questions