Commit a5b955de authored by Thomas Randolph's avatar Thomas Randolph

Add tests for the new SET_DIFF_FILES mutation

parent 26127fbe
...@@ -51,6 +51,24 @@ describe('DiffsStoreMutations', () => { ...@@ -51,6 +51,24 @@ describe('DiffsStoreMutations', () => {
}); });
}); });
describe('SET_DIFF_FILES', () => {
it('should set diffFiles in state', () => {
const state = {};
mutations[types.SET_DIFF_FILES](state, ['file', 'another file']);
expect(state.diffFiles.length).toEqual(2);
});
it('should not set anything except diffFiles in state', () => {
const state = {};
mutations[types.SET_DIFF_FILES](state, ['file', 'another file']);
expect(Object.keys(state)).toEqual(['diffFiles']);
});
});
describe('SET_DIFF_DATA', () => { describe('SET_DIFF_DATA', () => {
it('should set diff data type properly', () => { it('should set diff data type properly', () => {
const state = { const state = {
......
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