Commit 17f134ec authored by Romain Courteaud's avatar Romain Courteaud

update mutex test

parent 068ccd04
......@@ -171,7 +171,7 @@
var mutex = new Mutex(),
counter = 0;
stop();
expect(5);
expect(4);
function assertCounter(value) {
equal(counter, value);
counter += 1;
......@@ -201,7 +201,9 @@
})
.push(undefined, function (error) {
equal(error.message, 'error in callback1');
assertCounter(3);
// Callback 2 is called before RSVP.all is rejected
// Callback 3 is cancelled by RSVP.all
assertCounter(2);
})
.always(function () {
start();
......@@ -291,7 +293,7 @@
var mutex = new Mutex(),
counter = 0;
stop();
expect(2);
expect(3);
function assertCounter(value) {
equal(counter, value);
counter += 1;
......@@ -327,7 +329,7 @@
return RSVP.delay(200);
})
.push(function () {
assertCounter(3);
assertCounter(2);
})
.always(function () {
start();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment