Skip to content

Commit 631f8d6

Browse files
committed
test: adjust the test file to mock aggregate raw command
1 parent 7f3bcb3 commit 631f8d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/api/src/instrument-records/__tests__/instrument-records.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('InstrumentRecordsService', () => {
118118
}
119119
];
120120

121-
instrumentRecordModel.findMany.mockResolvedValueOnce(mockRecords);
121+
instrumentRecordModel.aggregateRaw.mockResolvedValueOnce(mockRecords);
122122
instrumentsService.findById.mockResolvedValueOnce(mockInstruments[0]);
123123

124124
const ability = { can: () => true } as any;
@@ -128,7 +128,7 @@ describe('InstrumentRecordsService', () => {
128128
expect(Array.isArray(result)).toBe(true);
129129
expect(result.length).toBeGreaterThan(0);
130130
expect(result[0]).toMatchObject({
131-
groupId: 'group-1',
131+
groupId: '123',
132132
instrumentEdition: 1,
133133
instrumentName: 'Test Instrument',
134134
measure: 'score',

0 commit comments

Comments
 (0)