Commit e45af3c8 authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Kushal Pandya

Define getJSONFixture globally in Jest

parent 916a69ea
...@@ -4,7 +4,7 @@ import $ from 'jquery'; ...@@ -4,7 +4,7 @@ import $ from 'jquery';
import Translate from '~/vue_shared/translate'; import Translate from '~/vue_shared/translate';
import { config as testUtilsConfig } from '@vue/test-utils'; import { config as testUtilsConfig } from '@vue/test-utils';
import { initializeTestTimeout } from './helpers/timeout'; import { initializeTestTimeout } from './helpers/timeout';
import { loadHTMLFixture, setHTMLFixture } from './helpers/fixtures'; import { getJSONFixture, loadHTMLFixture, setHTMLFixture } from './helpers/fixtures';
import { setupManualMocks } from './mocks/mocks_helper'; import { setupManualMocks } from './mocks/mocks_helper';
import customMatchers from './matchers'; import customMatchers from './matchers';
...@@ -43,6 +43,7 @@ Object.defineProperty(global.Element.prototype, 'innerText', { ...@@ -43,6 +43,7 @@ Object.defineProperty(global.Element.prototype, 'innerText', {
// convenience wrapper for migration from Karma // convenience wrapper for migration from Karma
Object.assign(global, { Object.assign(global, {
getJSONFixture,
loadFixtures: loadHTMLFixture, loadFixtures: loadHTMLFixture,
setFixtures: setHTMLFixture, setFixtures: setHTMLFixture,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment