mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-26 03:18:17 +01:00
LastSeenIndicatorView: programmatic tests, tweak to manual tests
FREEBIE
This commit is contained in:
18
test/views/last_seen_indicator_view_test.js
Normal file
18
test/views/last_seen_indicator_view_test.js
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user