mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: handle promise for reading protocol stream of trace (#6270)
This commit is contained in:
committed by
GitHub
parent
15d1906e7c
commit
8c1a5866c5
@@ -118,4 +118,16 @@ describeChromeOnly('Tracing', function () {
|
||||
const trace = await page.tracing.stop();
|
||||
expect(trace.toString()).toContain('screenshot');
|
||||
});
|
||||
|
||||
it('should properly fail if readProtocolStream errors out', async () => {
|
||||
await page.tracing.start({ path: __dirname });
|
||||
|
||||
let error: Error = null;
|
||||
try {
|
||||
await page.tracing.stop();
|
||||
} catch (error_) {
|
||||
error = error_;
|
||||
}
|
||||
expect(error).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user