Skip to content

Commit 000890b

Browse files
Update FinAppRepository Tests and Project Interface
- Modified the `FinAppRepository.test.ts` to include the 'name' field in the projection for project data retrieval, enhancing the accuracy of test expectations. - Added a documentation comment for the 'name' field in the `Project` interface within `types.ts`, clarifying its purpose in the project schema. These changes improve the clarity and reliability of tests related to project data, ensuring that the project name is correctly handled in the repository logic.
1 parent b1daa10 commit 000890b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

workers/main/src/services/FinApp/FinAppRepository.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('FinAppRepository', () => {
120120
expect(result).toEqual(mockProjects);
121121
expect(vi.mocked(ProjectModel).find).toHaveBeenCalledWith(
122122
{ redmine_id: { $in: [550] } },
123-
{ 'redmine_id': 1, 'quick_books_id': 1, 'history.rate': 1 },
123+
{ 'name': 1, 'redmine_id': 1, 'quick_books_id': 1, 'history.rate': 1 },
124124
);
125125
});
126126

workers/main/src/services/FinApp/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export interface Employee {
1212
}
1313

1414
export interface Project {
15+
/**
16+
* Project name
17+
*/
18+
name: string;
1519
/**
1620
* Redmine project ID (links to the corresponding project in Redmine)
1721
*/

0 commit comments

Comments
 (0)