mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-30 21:01:00 +00:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
	
		
			613 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
	
		
			613 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|   | describe("parsing", () => { | ||
|  |     test("can parse call import call", () => { | ||
|  |         expect("import('a')").toEval(); | ||
|  |         expect("import('a', )").toEval(); | ||
|  |         expect("import('a', {options: true})").toEval(); | ||
|  |     }); | ||
|  | 
 | ||
|  |     test("does not crash on unexpected tokens after import", () => { | ||
|  |         expect("f = import('a')").toEval(); | ||
|  | 
 | ||
|  |         expect("f= import").not.toEval(); | ||
|  |         expect("f= import;").not.toEval(); | ||
|  |         expect("f= import?").not.toEval(); | ||
|  |         expect("f= import'").not.toEval(); | ||
|  |         expect("f= import 'a'").not.toEval(); | ||
|  |         expect("f= import['a']").not.toEval(); | ||
|  |     }); | ||
|  | }); |