diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 18:06:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 18:06:53 +0000 |
commit | 996f700997805b3590da8d8afdd19d193989078a (patch) | |
tree | fb555d6012ea1a6f018694b62bba5c68c8c623e1 /spec/frontend/environment.js | |
parent | 083d64c6468a070ae7b0b406ead8d87da27d1d22 (diff) | |
download | gitlab-ce-996f700997805b3590da8d8afdd19d193989078a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/environment.js')
-rw-r--r-- | spec/frontend/environment.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/frontend/environment.js b/spec/frontend/environment.js index 290c0e797cb..3c6553f3547 100644 --- a/spec/frontend/environment.js +++ b/spec/frontend/environment.js @@ -41,6 +41,12 @@ class CustomEnvironment extends JSDOMEnvironment { this.global.fixturesBasePath = `${ROOT_PATH}/tmp/tests/frontend/fixtures${IS_EE ? '-ee' : ''}`; this.global.staticFixturesBasePath = `${ROOT_PATH}/spec/frontend/fixtures`; + /** + * window.fetch() is required by the apollo-upload-client library otherwise + * a ReferenceError is generated: https://github.com/jaydenseric/apollo-upload-client/issues/100 + */ + this.global.fetch = () => {}; + // Not yet supported by JSDOM: https://github.com/jsdom/jsdom/issues/317 this.global.document.createRange = () => ({ setStart: () => {}, |