TWNTY-4450 - Add tests for /modules/activities/emails (#4520)

* Add tests for `/modules/activities/emails`

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Fix tests

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Remove temporary changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
gitstart-app[bot]
2024-03-18 17:10:07 +01:00
committed by GitHub
parent bdbd77c696
commit 872fb2bd49
15 changed files with 334 additions and 5 deletions

View File

@ -0,0 +1,16 @@
import { gql } from '@apollo/client';
import { getTimelineThreadsFromCompanyId } from '../getTimelineThreadsFromCompanyId';
jest.mock('@apollo/client', () => ({
gql: jest.fn().mockImplementation((strings) => {
return strings.map((str: string) => str.trim()).join(' ');
}),
}));
describe('getTimelineThreadsFromCompanyId query', () => {
test('should construct the query correctly', () => {
expect(gql).toHaveBeenCalled();
expect(getTimelineThreadsFromCompanyId).toBeDefined();
});
});

View File

@ -0,0 +1,16 @@
import { gql } from '@apollo/client';
import { getTimelineThreadsFromPersonId } from '../getTimelineThreadsFromPersonId';
jest.mock('@apollo/client', () => ({
gql: jest.fn().mockImplementation((strings) => {
return strings.map((str: string) => str.trim()).join(' ');
}),
}));
describe('getTimelineThreadsFromPersonId query', () => {
test('should construct the query correctly', () => {
expect(gql).toHaveBeenCalled();
expect(getTimelineThreadsFromPersonId).toBeDefined();
});
});