feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722)
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>
This commit is contained in:
@@ -36,16 +36,14 @@ describe('#createPendingMessage', () => {
|
||||
message: 'hi',
|
||||
};
|
||||
it('returns the pending message with expected new keys', () => {
|
||||
expect(createPendingMessage(message)).toHaveProperty(
|
||||
'content',
|
||||
'id',
|
||||
'status',
|
||||
'echo_id',
|
||||
'status',
|
||||
'created_at',
|
||||
'message_type',
|
||||
'conversation_id'
|
||||
);
|
||||
expect(createPendingMessage(message)).toMatchObject({
|
||||
content: expect.anything(),
|
||||
id: expect.anything(),
|
||||
status: expect.anything(),
|
||||
echo_id: expect.anything(),
|
||||
created_at: expect.anything(),
|
||||
message_type: expect.anything(),
|
||||
});
|
||||
});
|
||||
|
||||
it('returns the pending message with status progress', () => {
|
||||
@@ -61,23 +59,20 @@ describe('#createPendingMessage', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('returns the pending message with attachmnet key if file is passed', () => {
|
||||
it('returns the pending message with attachment key if file is passed', () => {
|
||||
const messageWithFile = {
|
||||
message: 'hi',
|
||||
file: {},
|
||||
};
|
||||
expect(createPendingMessage(messageWithFile)).toHaveProperty(
|
||||
'content',
|
||||
'id',
|
||||
'status',
|
||||
'echo_id',
|
||||
'status',
|
||||
'created_at',
|
||||
'message_type',
|
||||
'conversation_id',
|
||||
'attachments',
|
||||
'private'
|
||||
);
|
||||
expect(createPendingMessage(messageWithFile)).toMatchObject({
|
||||
content: expect.anything(),
|
||||
id: expect.anything(),
|
||||
status: expect.anything(),
|
||||
echo_id: expect.anything(),
|
||||
created_at: expect.anything(),
|
||||
message_type: expect.anything(),
|
||||
attachments: [{ id: expect.anything() }],
|
||||
});
|
||||
});
|
||||
|
||||
it('returns the pending message to have one attachment', () => {
|
||||
|
||||
Reference in New Issue
Block a user