Commit 77c4783c authored by Jackie Fraser's avatar Jackie Fraser

Migrate spec vue_mr_widget/stores dir to Jest

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