fix(tracing): start without options (#4388)

This commit is contained in:
Andrey Lushnikov
2019-05-09 17:15:33 -07:00
committed by GitHub
parent 9a2fb2a0d4
commit ef24c69c62
3 changed files with 11 additions and 5 deletions

View File

@@ -66,6 +66,12 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p
const buf = fs.readFileSync(outputFile);
expect(trace.toString()).toEqual(buf.toString());
});
it('should work without options', async({page, server, outputFile}) => {
await page.tracing.start();
await page.goto(server.PREFIX + '/grid.html');
const trace = await page.tracing.stop();
expect(trace).toBeTruthy();
});
it('should return null in case of Buffer error', async({page, server}) => {
await page.tracing.start({screenshots: true});
await page.goto(server.PREFIX + '/grid.html');