Skip to content

Commit

Permalink
Update mutex.js
Browse files Browse the repository at this point in the history
  • Loading branch information
XeniaSiskaki authored Apr 30, 2018
1 parent 6bf8f9a commit b83c286
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/mutex.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ test('Mutex', function (t) {
t.equal(mutex.isLocked, true, 'Locked');
});

mutex.lock(function () {
t.equal(mutex.isLocked, true, 'Locked');
mutex.unlockAll();
t.equal(mutex.isLocked, false, 'Lock is waiting to be acquired');
});
var success = mutex.tryLock();
t.equal(success, false, 'Try failed');

mutex.unlockAll();
t.equal(mutex.isLocked, false, 'Lock is waiting to be acquired');
});

0 comments on commit b83c286

Please sign in to comment.