Pranav Raj S
2023-06-08 20:12:14 -07:00
committed by GitHub
parent 7fd220c177
commit c8fac08e0b
2 changed files with 12 additions and 5 deletions

View File

@@ -288,6 +288,14 @@ describe('#mutations', () => {
mutations[types.SET_ALL_ATTACHMENTS](state, { id: 1, data });
expect(state.allConversations[0].attachments).toEqual(data);
});
it('set attachments key even if the attachments are empty', () => {
const state = {
allConversations: [{ id: 1 }],
};
const data = [];
mutations[types.SET_ALL_ATTACHMENTS](state, { id: 1, data });
expect(state.allConversations[0].attachments).toEqual([]);
});
});
describe('#ADD_CONVERSATION_ATTACHMENTS', () => {