mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			9 lines
		
	
	
		
			351 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			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);
 | 
						|
});
 |