diff options
Diffstat (limited to 'spec/frontend/environment.js')
-rw-r--r-- | spec/frontend/environment.js | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/spec/frontend/environment.js b/spec/frontend/environment.js index c9d77a34595..35ca323f5a9 100644 --- a/spec/frontend/environment.js +++ b/spec/frontend/environment.js @@ -50,18 +50,14 @@ class CustomEnvironment extends JSDOMEnvironment { */ this.global.fetch = () => {}; - // Not yet supported by JSDOM: https://github.com/jsdom/jsdom/issues/317 - this.global.document.createRange = () => ({ - setStart: () => {}, - setEnd: () => {}, - commonAncestorContainer: { - nodeName: 'BODY', - ownerDocument: this.global.document, - }, - }); - // Expose the jsdom (created in super class) to the global so that we can call reconfigure({ url: '' }) to properly set `window.location` - this.global.dom = this.dom; + this.global.jsdom = this.dom; + + Object.assign(this.global.performance, { + mark: () => null, + measure: () => null, + getEntriesByName: () => [], + }); } async teardown() { |