Are tests conducted in Jasmine 2.0 in parallel? In my experience, this is not the article referenced by Jasmine.js: Race conditions when using "runs" suggests that Jasmine runs them in parallel, so I wondered if I wrote my tests incorrectly.
Here is a set of tests that I would expect to complete 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); }); });
Did I miss something?
jsFiddle
source share