gitlab-org--gitlab-foss/spec/frontend/whats_new/store/mutations_spec.js

25 lines
606 B
JavaScript

import mutations from '~/whats_new/store/mutations';
import createState from '~/whats_new/store/state';
import * as types from '~/whats_new/store/mutation_types';
describe('whats new mutations', () => {
let state;
beforeEach(() => {
state = createState;
});
describe('openDrawer', () => {
it('sets open to true', () => {
mutations[types.OPEN_DRAWER](state);
expect(state.open).toBe(true);
});
});
describe('closeDrawer', () => {
it('sets open to false', () => {
mutations[types.CLOSE_DRAWER](state);
expect(state.open).toBe(false);
});
});
});