Update chai

Level up Chai! New ability unlocked: assert.isBelow(val, limit)

// FREEBIE
pull/749/head
lilia 9 years ago
parent 080c233a93
commit 26df196aba

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -72,11 +72,11 @@ describe('TimestampView', function() {
it('updates at reasonable intervals', function() {
var view = new Whisper.TimestampView();
assert(view.computeDelay(1000) < 60 * 1000); // < minute
assert.isBelow(view.computeDelay(1000), 60 * 1000); // < minute
assert.strictEqual(view.computeDelay(1000 * 60 * 5), 60 * 1000); // minute
assert.strictEqual(view.computeDelay(1000 * 60 * 60 * 5), 60 * 60 * 1000); // hour
assert(view.computeDelay(6 * 24 * 60 * 60 * 1000) < 7 * 24 * 60 * 60 * 1000); // < week
assert.isBelow(view.computeDelay(6 * 24 * 60 * 60 * 1000), 7 * 24 * 60 * 60 * 1000); // < week
// return falsey value for long ago dates that don't update
assert.notOk(view.computeDelay(1000 * 60 * 60 * 24 * 8));

Loading…
Cancel
Save