Update chai

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

// FREEBIE
This commit is contained in:
lilia 2016-01-27 12:25:40 -08:00
parent 080c233a93
commit 26df196aba
3 changed files with 11133 additions and 8703 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

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