Skip to content

Commit cbbd4ec

Browse files
Copilothotlong
andcommitted
Changes before error encountered
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 84f920d commit cbbd4ec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/showcase/project-tracker/__tests__/projects-hooks-actions.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ describe('Project Hooks - Comprehensive Examples', () => {
2929
default: {
3030
find: jest.fn().mockResolvedValue([]),
3131
findOne: jest.fn().mockResolvedValue(null),
32-
create: jest.fn((obj, data) => ({ ...data, _id: 'test-id' })),
33-
update: jest.fn((obj, id, data) => data),
32+
create: jest.fn((obj, data, ctx) => ({ ...data, _id: 'test-id' })),
33+
update: jest.fn((obj, id, data, ctx) => data),
3434
delete: jest.fn().mockResolvedValue(true),
3535
count: jest.fn().mockResolvedValue(0)
3636
} as any
@@ -83,6 +83,7 @@ describe('Project Hooks - Comprehensive Examples', () => {
8383
await repo.create({ name: 'Test Project' });
8484

8585
const driver = app.datasource('default');
86+
console.log('driver.create calls:', JSON.stringify(driver.create.mock.calls));
8687
expect(driver.create).toHaveBeenCalledWith(
8788
'projects',
8889
expect.objectContaining({

0 commit comments

Comments
 (0)