mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Hopefully these cleanups will make it a little easier to migrate our tests to take advantage of a true module loading system.
		
			
				
	
	
		
			19 lines
		
	
	
		
			502 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			502 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
set_global('$', global.make_zjquery());
 | 
						|
 | 
						|
zrequire('common');
 | 
						|
 | 
						|
run_test('basics', () => {
 | 
						|
    common.autofocus('#home');
 | 
						|
    assert($('#home').is_focused());
 | 
						|
});
 | 
						|
 | 
						|
run_test('phrase_match', () => {
 | 
						|
    assert(common.phrase_match('tes', 'test'));
 | 
						|
    assert(common.phrase_match('Tes', 'test'));
 | 
						|
    assert(common.phrase_match('Tes', 'Test'));
 | 
						|
    assert(common.phrase_match('tes', 'Stream Test'));
 | 
						|
 | 
						|
    assert(!common.phrase_match('tests', 'test'));
 | 
						|
    assert(!common.phrase_match('tes', 'hostess'));
 | 
						|
});
 |