Fix: Hide prechat for sessions inititated with setUser (#1914)

This commit is contained in:
Nithin David Thomas
2021-03-20 17:44:20 +05:30
committed by GitHub
parent 484c32fae3
commit 3043ee5058
10 changed files with 105 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
import { mutations } from '../../contacts';
describe('#mutations', () => {
describe('#SET_CURRENT_USER', () => {
it('set current user', () => {
const user = {
email: 'thoma@sphadikam.com',
name: 'Adu Thoma',
avatar_url: '',
identifier_hash: 'malana_hash',
};
const state = { currentUser: {} };
mutations.SET_CURRENT_USER(state, user);
expect(state.currentUser).toEqual(user);
});
});
});