test: scrub port from coverage golden files (#1723)

This commit is contained in:
JoelEinbinder 2018-01-04 11:47:30 -08:00 committed by Andrey Lushnikov
parent f0b11ad22e
commit e7eacd443f
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[
{
"url": "http://localhost:8907/csscoverage/involved.html",
"url": "http://localhost:<PORT>/csscoverage/involved.html",
"ranges": [
{
"start": 149,

View File

@ -1,6 +1,6 @@
[
{
"url": "http://localhost:8907/jscoverage/involved.html",
"url": "http://localhost:<PORT>/jscoverage/involved.html",
"ranges": [
{
"start": 0,

View File

@ -3479,7 +3479,7 @@ describe('Page', function() {
await page.coverage.startJSCoverage();
await page.goto(server.PREFIX + '/jscoverage/involved.html');
const coverage = await page.coverage.stopJSCoverage();
expect(JSON.stringify(coverage, null, 2)).toBeGolden('jscoverage-involved.txt');
expect(JSON.stringify(coverage, null, 2).replace(/:\d{4}\//g, ':<PORT>/')).toBeGolden('jscoverage-involved.txt');
});
describe('resetOnNavigation', function() {
it('should report scripts across navigations when disabled', async function({page, server}) {
@ -3549,7 +3549,7 @@ describe('Page', function() {
await page.coverage.startCSSCoverage();
await page.goto(server.PREFIX + '/csscoverage/involved.html');
const coverage = await page.coverage.stopCSSCoverage();
expect(JSON.stringify(coverage, null, 2)).toBeGolden('csscoverage-involved.txt');
expect(JSON.stringify(coverage, null, 2).replace(/:\d{4}\//g, ':<PORT>/')).toBeGolden('csscoverage-involved.txt');
});
it('should ignore injected stylesheets', async function({page, server}) {
await page.coverage.startCSSCoverage();