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>
34 lines
934 B
JavaScript
34 lines
934 B
JavaScript
import { actions } from '../../conversationPage';
|
|
import * as types from '../../../mutation-types';
|
|
|
|
const commit = vi.fn();
|
|
|
|
describe('#actions', () => {
|
|
describe('#setCurrentPage', () => {
|
|
it('sends correct actions', () => {
|
|
actions.setCurrentPage({ commit }, { filter: 'me', page: 1 });
|
|
expect(commit.mock.calls).toEqual([
|
|
[types.default.SET_CURRENT_PAGE, { filter: 'me', page: 1 }],
|
|
]);
|
|
});
|
|
});
|
|
|
|
describe('#setEndReached', () => {
|
|
it('sends correct actions', () => {
|
|
actions.setEndReached({ commit }, { filter: 'me' });
|
|
expect(commit.mock.calls).toEqual([
|
|
[types.default.SET_CONVERSATION_END_REACHED, { filter: 'me' }],
|
|
]);
|
|
});
|
|
});
|
|
|
|
describe('#reset', () => {
|
|
it('sends correct actions', () => {
|
|
actions.reset({ commit });
|
|
expect(commit.mock.calls).toEqual([
|
|
[types.default.CLEAR_CONVERSATION_PAGE],
|
|
]);
|
|
});
|
|
});
|
|
});
|