Commit 2b41b178 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'migrate_mr_widget_store_spec_to_jest' into 'master'

Migrate spec vue_mr_widget/stores dir to Jest

See merge request gitlab-org/gitlab!30581
parents 7da7c18c 77c4783c
import MockAdapter from 'axios-mock-adapter';
import testAction from 'spec/helpers/vuex_action_helper';
import { TEST_HOST } from 'spec/test_constants';
import testAction from 'helpers/vuex_action_helper';
import { TEST_HOST } from 'helpers/test_constants';
import axios from '~/lib/utils/axios_utils';
import {
setEndpoint,
......
......@@ -73,13 +73,13 @@ describe('MergeRequestStore', () => {
it('returns true when nothingToMerge', () => {
store.state = stateKey.nothingToMerge;
expect(store.isNothingToMergeState).toEqual(true);
expect(store.isNothingToMergeState).toBe(true);
});
it('returns false when not nothingToMerge', () => {
store.state = 'state';
expect(store.isNothingToMergeState).toEqual(false);
expect(store.isNothingToMergeState).toBe(false);
});
});
});
......@@ -88,13 +88,13 @@ describe('MergeRequestStore', () => {
it('should set the add ci config path', () => {
store.setData({ ...mockData });
expect(store.mergeRequestAddCiConfigPath).toEqual('/group2/project2/new/pipeline');
expect(store.mergeRequestAddCiConfigPath).toBe('/group2/project2/new/pipeline');
});
it('should set humanAccess=Maintainer when user has that role', () => {
store.setData({ ...mockData });
expect(store.humanAccess).toEqual('Maintainer');
expect(store.humanAccess).toBe('Maintainer');
});
it('should set pipelinesEmptySvgPath', () => {
......
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