diff options
author | Mike Greiling <mike@pixelcog.com> | 2019-06-26 23:17:57 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-06-26 23:17:57 +0300 |
commit | 871d06993edba9220c10ef2ca5c64f412ee5f984 (patch) | |
tree | 389de71e426700417cdd02e06322bafbf055da2e /spec | |
parent | 8c28c3e84eb3e330f10bf2c765668a23dfce5080 (diff) | |
parent | ee6fb858fd67826e066a3ac934ddf3fe99d1c7b2 (diff) |
Merge branch '62765-add-jquery-to-jest-setup' into 'master'
Add jQuery in jest test_setup
See merge request gitlab-org/gitlab-ce!30100
Diffstat (limited to 'spec')
-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(() => |