LastSeenIndicatorView: programmatic tests, tweak to manual tests

FREEBIE
This commit is contained in:
Scott Nonnenberg
2017-05-18 12:26:43 -07:00
parent 1608acf449
commit 318162e74a
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/*
* vim: ts=4:sw=4:expandtab
*/
describe('LastSeenIndicatorView', function() {
// TODO: in electron branch, wheere we have access to real i18n, test rendered HTML
it('renders provided count', function() {
var view = new Whisper.LastSeenIndicatorView({count: 10});
assert.equal(view.count, 10);
});
it('increments count', function() {
var view = new Whisper.LastSeenIndicatorView({count: 4});
assert.equal(view.count, 4);
view.increment(3);
assert.equal(view.count, 7);
});
});