Files
zulip/frontend_tests/node_tests/ui.js
Marco Burstein bb09bea0b6 ui: Simplify hotkey deprecation notices.
To reduce code duplication when creating hotkey deprecation notices,
create the `get_hotkey_deprecation_notice` function. Also, create a
`ui` testing file with a test for the new function.

Fix #10004.
2018-07-23 22:41:59 -07:00

9 lines
351 B
JavaScript

var ui = zrequire('ui');
set_global('i18n', global.stub_i18n);
run_test('get_hotkey_deprecation_notice', () => {
var expected = 'translated: We\'ve replaced the "*" hotkey with "Ctrl + s" to make this common shortcut easier to trigger.';
var actual = ui.get_hotkey_deprecation_notice('*', 'Ctrl + s');
assert.equal(expected, actual);
});