feat: Update notifications and unread count in real time (#4261)

This commit is contained in:
Muhsin Keloth
2022-03-28 20:01:23 +05:30
committed by GitHub
parent ec0ea0b1dc
commit ccf52a620b
11 changed files with 78 additions and 6 deletions

View File

@@ -90,4 +90,12 @@ describe('#actions', () => {
await expect(actions.readAll({ commit })).rejects.toThrow(Error);
});
});
describe('#addNotification', () => {
it('sends correct actions if API is success', async () => {
await actions.addNotification({ commit }, { data: 1 });
expect(commit.mock.calls).toEqual([
[types.ADD_NOTIFICATION, { data: 1 }],
]);
});
});
});