chore: Add action to set dark mode from the react-native-widget (#7167)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Muhsin Keloth
2023-05-23 04:04:09 +05:30
committed by GitHub
parent d481b9fbcf
commit 03bbd048a7
6 changed files with 32 additions and 0 deletions

View File

@@ -24,4 +24,12 @@ describe('#mutations', () => {
expect(state.widgetColor).toEqual('#00bcd4');
});
});
describe('#SET_COLOR_SCHEME', () => {
it('sets dark mode properly', () => {
const state = { darkMode: 'light' };
mutations.SET_COLOR_SCHEME(state, 'dark');
expect(state.darkMode).toEqual('dark');
});
});
});