Due to the pattern `**/specs/*.spec.js` defined in CircleCI, none of the frontend spec in the folders such as `specs/<domain-name>/getters.spec.js` were not executed in Circle CI. This PR fixes the issue, along with the following changes: - Use vitest instead of jest - Remove jest dependancies - Update tests to work with vitest --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
import { actions } from '../../appConfig';
|
|
|
|
const commit = vi.fn();
|
|
describe('#actions', () => {
|
|
describe('#setReferrerHost', () => {
|
|
it('creates actions properly', () => {
|
|
actions.setReferrerHost({ commit }, 'www.chatwoot.com');
|
|
expect(commit.mock.calls).toEqual([
|
|
['SET_REFERRER_HOST', 'www.chatwoot.com'],
|
|
]);
|
|
});
|
|
});
|
|
|
|
describe('#setBubbleVisibility', () => {
|
|
it('creates actions properly', () => {
|
|
actions.setBubbleVisibility({ commit }, false);
|
|
expect(commit.mock.calls).toEqual([['SET_BUBBLE_VISIBILITY', false]]);
|
|
});
|
|
});
|
|
|
|
describe('#setWidgetColor', () => {
|
|
it('creates actions properly', () => {
|
|
actions.setWidgetColor({ commit }, '#eaeaea');
|
|
expect(commit.mock.calls).toEqual([['SET_WIDGET_COLOR', '#eaeaea']]);
|
|
});
|
|
});
|
|
|
|
describe('#setColorScheme', () => {
|
|
it('creates actions for dark mode properly', () => {
|
|
actions.setColorScheme({ commit }, 'dark');
|
|
expect(commit.mock.calls).toEqual([['SET_COLOR_SCHEME', 'dark']]);
|
|
});
|
|
});
|
|
});
|