mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	zjsunit: Clear $ elements in run_test.
We now call $.clear_all_elements at the top
of run_test.
We have to exempt two modules from the new regime:
    compose
    settings_user_groups
Also, if modules do set_global("$", ...) we don't
try to call the non-existent function.
It's possible we'll want to move to something like
this, but we might want to clean up the two
sloppy_$ modules first:
    // AVOID THIS:
    // const $ = require("zjquery")
    run_test("test widget", ({override, $}) => {
        override(foo, "bar", ...);
        $.create(...);
        // do stuff
    });
			
			
This commit is contained in:
		
				
					committed by
					
						
						Steve Howell
					
				
			
			
				
	
			
			
			
						parent
						
							81fd1a5e6a
						
					
				
				
					commit
					ac69450681
				
			@@ -149,7 +149,8 @@ people.add_active_user(alice);
 | 
			
		||||
people.add_active_user(bob);
 | 
			
		||||
 | 
			
		||||
function test_ui(label, f) {
 | 
			
		||||
    run_test(label, f);
 | 
			
		||||
    // The sloppy_$ flag lets us re-use setup from prior tests.
 | 
			
		||||
    run_test(label, f, {sloppy_$: true});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
test_ui("validate_stream_message_address_info", () => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user