test: scrub port from coverage golden files (#1723)
This commit is contained in:
parent
f0b11ad22e
commit
e7eacd443f
@ -1,6 +1,6 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"url": "http://localhost:8907/csscoverage/involved.html",
|
"url": "http://localhost:<PORT>/csscoverage/involved.html",
|
||||||
"ranges": [
|
"ranges": [
|
||||||
{
|
{
|
||||||
"start": 149,
|
"start": 149,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"url": "http://localhost:8907/jscoverage/involved.html",
|
"url": "http://localhost:<PORT>/jscoverage/involved.html",
|
||||||
"ranges": [
|
"ranges": [
|
||||||
{
|
{
|
||||||
"start": 0,
|
"start": 0,
|
||||||
|
@ -3479,7 +3479,7 @@ describe('Page', function() {
|
|||||||
await page.coverage.startJSCoverage();
|
await page.coverage.startJSCoverage();
|
||||||
await page.goto(server.PREFIX + '/jscoverage/involved.html');
|
await page.goto(server.PREFIX + '/jscoverage/involved.html');
|
||||||
const coverage = await page.coverage.stopJSCoverage();
|
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() {
|
describe('resetOnNavigation', function() {
|
||||||
it('should report scripts across navigations when disabled', async function({page, server}) {
|
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.coverage.startCSSCoverage();
|
||||||
await page.goto(server.PREFIX + '/csscoverage/involved.html');
|
await page.goto(server.PREFIX + '/csscoverage/involved.html');
|
||||||
const coverage = await page.coverage.stopCSSCoverage();
|
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}) {
|
it('should ignore injected stylesheets', async function({page, server}) {
|
||||||
await page.coverage.startCSSCoverage();
|
await page.coverage.startCSSCoverage();
|
||||||
|
Loading…
Reference in New Issue
Block a user