From: Eduardo San Martin Morote Date: Thu, 2 May 2019 10:55:33 +0000 (+0200) Subject: chore: refactor utils in test X-Git-Tag: v4.0.0-alpha.0~413 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d87df71cd11873ca66c1b684d409e993c849423c;p=thirdparty%2Fvuejs%2Frouter.git chore: refactor utils in test --- diff --git a/__tests__/html5.spec.js b/__tests__/html5.spec.js index ec903790..7a714011 100644 --- a/__tests__/html5.spec.js +++ b/__tests__/html5.spec.js @@ -2,22 +2,11 @@ require('./helper') const expect = require('expect') const { HTML5History } = require('../src/history/html5') -const { JSDOM } = require('jsdom') +const { createDom } = require('./utils') describe.skip('History HTMl5', () => { beforeAll(() => { - // TODO: move to utils for tests that need DOM - const dom = new JSDOM( - ``, - { - url: 'https://example.org/', - referrer: 'https://example.com/', - contentType: 'text/html', - } - ) - - // @ts-ignore - global.window = dom.window + createDom() }) it('can be instantiated', () => {