Skip to content

Commit

Permalink
test: scrub port from coverage golden files (#1723)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelEinbinder authored and aslushnikov committed Jan 4, 2018
1 parent f0b11ad commit e7eacd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/golden/csscoverage-involved.txt
@@ -1,6 +1,6 @@
[
{
"url": "http://localhost:8907/csscoverage/involved.html",
"url": "http://localhost:<PORT>/csscoverage/involved.html",
"ranges": [
{
"start": 149,
Expand Down
2 changes: 1 addition & 1 deletion test/golden/jscoverage-involved.txt
@@ -1,6 +1,6 @@
[
{
"url": "http://localhost:8907/jscoverage/involved.html",
"url": "http://localhost:<PORT>/jscoverage/involved.html",
"ranges": [
{
"start": 0,
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Expand Up @@ -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}) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit e7eacd4

Please sign in to comment.