mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	chore: fix codegen SIGINT test (#34468)
This commit is contained in:
		
							parent
							
								
									9d91d7a1e9
								
							
						
					
					
						commit
						fccb2b0784
					
				| @ -459,8 +459,13 @@ await page1.GotoAsync("about:blank?foo");`); | |||||||
|     const cli = runCLI([`--save-storage=${storageFileName}`, `--save-har=${harFileName}`]); |     const cli = runCLI([`--save-storage=${storageFileName}`, `--save-har=${harFileName}`]); | ||||||
|     await cli.waitFor(`import { test, expect } from '@playwright/test'`); |     await cli.waitFor(`import { test, expect } from '@playwright/test'`); | ||||||
|     await cli.process.kill('SIGINT'); |     await cli.process.kill('SIGINT'); | ||||||
|     const { exitCode } = await cli.process.exited; |     const { exitCode, signal } = await cli.process.exited; | ||||||
|     expect(exitCode).toBe(130); |     if (exitCode !== null) { | ||||||
|  |       expect(exitCode).toBe(130); | ||||||
|  |     } else { | ||||||
|  |       // If the runner is slow enough, the process will be forcibly terminated by the signal
 | ||||||
|  |       expect(signal).toBe('SIGINT'); | ||||||
|  |     } | ||||||
|     expect(fs.existsSync(storageFileName)).toBeTruthy(); |     expect(fs.existsSync(storageFileName)).toBeTruthy(); | ||||||
|     expect(fs.existsSync(harFileName)).toBeTruthy(); |     expect(fs.existsSync(harFileName)).toBeTruthy(); | ||||||
|   }); |   }); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Adam Gastineau
						Adam Gastineau