diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-06-21 22:35:51 -0500 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-06-26 13:48:01 -0500 |
commit | ee6fb858fd67826e066a3ac934ddf3fe99d1c7b2 (patch) | |
tree | da7f94aaaca72772c3ad3399e014823fd54e5c78 | |
parent | 05a7fcbdf79fbff25048161657cfacdd58395b76 (diff) | |
download | gitlab-ce-ee6fb858fd67826e066a3ac934ddf3fe99d1c7b2.tar.gz |
Add jQuery to jest test_setup
-rw-r--r-- | spec/frontend/test_setup.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/frontend/test_setup.js b/spec/frontend/test_setup.js index 7e7cc1488b8..c17d5253997 100644 --- a/spec/frontend/test_setup.js +++ b/spec/frontend/test_setup.js @@ -1,10 +1,16 @@ import Vue from 'vue'; import * as jqueryMatchers from 'custom-jquery-matchers'; +import $ from 'jquery'; import Translate from '~/vue_shared/translate'; import axios from '~/lib/utils/axios_utils'; import { initializeTestTimeout } from './helpers/timeout'; import { loadHTMLFixture, setHTMLFixture } from './helpers/fixtures'; +// Expose jQuery so specs using jQuery plugins can be imported nicely. +// Here is an issue to explore better alternatives: +// https://gitlab.com/gitlab-org/gitlab-ee/issues/12448 +window.jQuery = $; + process.on('unhandledRejection', global.promiseRejectionHandler); afterEach(() => |