Add jQuery to jest test_setup

This commit is contained in:
Paul Slaughter 2019-06-21 22:35:51 -05:00
parent 05a7fcbdf7
commit ee6fb858fd
No known key found for this signature in database
GPG Key ID: DF5690803C68282A
1 changed files with 6 additions and 0 deletions

View File

@ -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(() =>