Skip to content

Commit

Permalink
tests: remove global.URL (#10186)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored Jan 7, 2020
1 parent 81c6e92 commit 17ac7e2
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const fs = require('fs');
const jsdom = require('jsdom');
const Util = require('../../../../report/html/renderer/util.js');
const I18n = require('../../../../report/html/renderer/i18n.js');
const URL = require('../../../../lib/url-shim.js');
const DOM = require('../../../../report/html/renderer/dom.js');
const DetailsRenderer = require('../../../../report/html/renderer/details-renderer.js');
const CriticalRequestChainRenderer = require(
Expand All @@ -28,7 +27,6 @@ describe('CategoryRenderer', () => {
let sampleResults;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});
global.CriticalRequestChainRenderer = CriticalRequestChainRenderer;
Expand All @@ -42,7 +40,6 @@ describe('CategoryRenderer', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
global.CriticalRequestChainRenderer = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
const assert = require('assert');
const fs = require('fs');
const jsdom = require('jsdom');
const URL = require('../../../../lib/url-shim.js');
const Util = require('../../../../report/html/renderer/util.js');
const I18n = require('../../../../report/html/renderer/i18n.js');
const DOM = require('../../../../report/html/renderer/dom.js');
Expand Down Expand Up @@ -80,7 +79,6 @@ describe('DetailsRenderer', () => {
let detailsRenderer;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});
const {document} = new jsdom.JSDOM(TEMPLATE_FILE).window;
Expand All @@ -89,7 +87,6 @@ describe('DetailsRenderer', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
const assert = require('assert');
const fs = require('fs');
const jsdom = require('jsdom');
const URL = require('../../../../lib/url-shim.js');
const DOM = require('../../../../report/html/renderer/dom.js');
const Util = require('../../../../report/html/renderer/util.js');
const I18n = require('../../../../report/html/renderer/i18n.js');
Expand All @@ -25,7 +24,6 @@ describe('DetailsRenderer', () => {
let renderer;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});
global.CriticalRequestChainRenderer = CrcDetailsRenderer;
Expand All @@ -37,7 +35,6 @@ describe('DetailsRenderer', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
global.CriticalRequestChainRenderer = undefined;
Expand Down
3 changes: 0 additions & 3 deletions lighthouse-core/test/report/html/renderer/dom-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
const assert = require('assert');
const fs = require('fs');
const jsdom = require('jsdom');
const URL = require('../../../../lib/url-shim.js');
const DOM = require('../../../../report/html/renderer/dom.js');
const Util = require('../../../../report/html/renderer/util.js');
const I18n = require('../../../../report/html/renderer/i18n.js');
Expand All @@ -22,7 +21,6 @@ describe('DOM', () => {
let dom;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});
const {document} = new jsdom.JSDOM(TEMPLATE_FILE).window;
Expand All @@ -31,7 +29,6 @@ describe('DOM', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ describe('PerfCategoryRenderer', () => {
let sampleResults;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});
global.CriticalRequestChainRenderer = CriticalRequestChainRenderer;
Expand All @@ -49,7 +48,6 @@ describe('PerfCategoryRenderer', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
global.CriticalRequestChainRenderer = undefined;
Expand Down
3 changes: 0 additions & 3 deletions lighthouse-core/test/report/html/renderer/psi-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const fs = require('fs');

const jsdom = require('jsdom');

const URL = require('../../../../lib/url-shim.js');
const prepareLabData = require('../../../../report/html/renderer/psi.js');
const Util = require('../../../../report/html/renderer/util.js');
const I18n = require('../../../../report/html/renderer/i18n.js');
Expand All @@ -36,7 +35,6 @@ const TEMPLATE_FILE = fs.readFileSync(
describe('DOM', () => {
let document;
beforeAll(() => {
global.URL = URL; // COMPAT: Needed for Node < 10
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});

Expand All @@ -55,7 +53,6 @@ describe('DOM', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
global.DOM = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const fs = require('fs');
const jsdom = require('jsdom');
const Util = require('../../../../report/html/renderer/util.js');
const I18n = require('../../../../report/html/renderer/i18n.js');
const URL = require('../../../../lib/url-shim.js');
const DOM = require('../../../../report/html/renderer/dom.js');
const DetailsRenderer = require('../../../../report/html/renderer/details-renderer.js');
const CategoryRenderer = require('../../../../report/html/renderer/category-renderer.js');
Expand All @@ -27,7 +26,6 @@ describe('PwaCategoryRenderer', () => {
let sampleResults;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.Util.i18n = new I18n('en', {...Util.UIStrings});
global.CategoryRenderer = CategoryRenderer;
Expand All @@ -50,7 +48,6 @@ describe('PwaCategoryRenderer', () => {
});

afterAll(() => {
global.URL = undefined;
global.Util.i18n = undefined;
global.Util = undefined;
global.CategoryRenderer = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('ReportRenderer', () => {
let sampleResults;

beforeAll(() => {
global.URL = URL;
global.Util = Util;
global.I18n = I18n;
global.ReportUIFeatures = ReportUIFeatures;
Expand Down Expand Up @@ -64,7 +63,6 @@ describe('ReportRenderer', () => {

afterAll(() => {
global.self = undefined;
global.URL = undefined;
global.Util = undefined;
global.I18n = undefined;
global.ReportUIFeatures = undefined;
Expand Down

0 comments on commit 17ac7e2

Please sign in to comment.