Are tests in Jasmine 2.0 run in parallel? In my experience they aren't but the article , referenced by Jasmine.js: Race Conditions when using "runs" suggests that Jasmine does run them in parallel so I wondered if I was writing my tests incorrectly.
Here is a set of tests that I would expect to execute in 1 second instead of 4 seconds.
describe("first suite", function() {
it("first test", function(done) {
expect(true).toBeTruthy();
setTimeout(done, 1000);
});
it("second test", function(done) {
expect(true).toBeTruthy();
setTimeout(done, 1000);
});
});
describe("second suite", function() {
it("first test", function(done) {
expect(true).toBeTruthy();
setTimeout(done, 1000);
});
it("second test", function(done) {
expect(true).toBeTruthy();
setTimeout(done, 1000);
});
});
Am I missing something?