Commit f4511a45 authored by Andrew Fontaine's avatar Andrew Fontaine

Port Feature Flags Edit Actions Spec to Jest

Had to mock the `url_utility` functions.
parent e33a71f2
import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import actions, {
import {
setEndpoint,
setPath,
updateFeatureFlag,
......@@ -15,9 +15,11 @@ import actions, {
} from 'ee/feature_flags/store/modules/edit/actions';
import state from 'ee/feature_flags/store/modules/edit/state';
import * as types from 'ee/feature_flags/store/modules/edit/mutation_types';
import testAction from 'spec/helpers/vuex_action_helper';
import testAction from 'helpers/vuex_action_helper';
import { TEST_HOST } from 'spec/test_constants';
jest.mock('~/lib/utils/url_utility');
describe('Feature flags Edit Module actions', () => {
let mockedState;
......@@ -57,7 +59,6 @@ describe('Feature flags Edit Module actions', () => {
beforeEach(() => {
mockedState.endpoint = `${TEST_HOST}/endpoint.json`;
mock = new MockAdapter(axios);
spyOnDependency(actions, 'visitUrl');
});
afterEach(() => {
......
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