137
rated 0 times
[
142]
[
5]
/ answers: 1 / hits: 18595
/ 11 Years ago, tue, january 7, 2014, 12:00:00
The recently released Jasmine 2.0 removes the waits functions and the runs()
from the Async Jasmine 1.3.
I have old 1.3 tests I'd like to transition to the new style.
For the waits, in most cases it seems like you can write beforeEach()
and afterEach()
carefully for the same effect.
What is the best way to reproduce the runs()
which simply executes the contained functions sequentially?
My first try:
runs(function() {
expect(true).toBe(true);
}
becomes
(function() {
expect(true).toBe(true);
})()
More From » jasmine