Skip to content

Commit

Permalink
Node doesnt have URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Apr 11, 2017
1 parent 23715f8 commit bbd5671
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lighthouse-core/test/report/v2/report-renderer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,24 @@
const assert = require('assert');
const fs = require('fs');
const jsdom = require('jsdom');
const URL = require('../../../lib/url-shim'); // eslint-disable-line no-unused-vars
const ReportRenderer = require('../../../report/v2/report-renderer.js');
const sampleResults = require('../../results/sample_v2.json');
const URL = window.URL = require('../../../lib/url-shim'); // eslint-disable-line no-unused-vars

const TEMPLATE_FILE = fs.readFileSync(__dirname + '/../../../report/v2/templates.html', 'utf8');

describe('ReportRenderer V2', () => {
before(() => {
global.URL = URL;
});

after(() => {
global.URL = undefined;
});

const document = jsdom.jsdom(TEMPLATE_FILE);
const renderer = new ReportRenderer(document);


describe('createElement', () => {
it('creates a simple element using default values', () => {
const el = renderer._createElement('div');
Expand Down

0 comments on commit bbd5671

Please sign in to comment.