diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/environment.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
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() { |