From 996f700997805b3590da8d8afdd19d193989078a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 31 Oct 2019 18:06:53 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/environment.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/frontend/environment.js') 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: () => {}, -- cgit v1.2.3