mirror of https://github.com/zulip/zulip.git
tests: Reach 100% coverage for keydown_util.
This commit pretty much just gets line coverage.
This commit is contained in:
parent
5f4895f780
commit
015bc8b01e
|
@ -0,0 +1,26 @@
|
|||
set_global('$', global.make_zjquery());
|
||||
|
||||
zrequire('keydown_util');
|
||||
|
||||
run_test('test_early_returns', () => {
|
||||
var stub = $.create('stub');
|
||||
var opts = {
|
||||
elem: stub,
|
||||
handlers: {},
|
||||
};
|
||||
|
||||
keydown_util.handle(opts);
|
||||
var keydown_f = stub.keydown;
|
||||
|
||||
var e1 = {
|
||||
which: 17, // not in keys
|
||||
};
|
||||
|
||||
keydown_f(e1);
|
||||
|
||||
var e2 = {
|
||||
which: 13, // no handler
|
||||
};
|
||||
|
||||
keydown_f(e2);
|
||||
});
|
|
@ -43,6 +43,7 @@ enforce_fully_covered = {
|
|||
'static/js/fetch_status.js',
|
||||
'static/js/filter.js',
|
||||
'static/js/hash_util.js',
|
||||
'static/js/keydown_util.js',
|
||||
'static/js/markdown.js',
|
||||
'static/js/message_store.js',
|
||||
'static/js/muting.js',
|
||||
|
|
Loading…
Reference in New Issue