Skip to content

Commit e217e75

Browse files
committed
fix job-queue e2e test: use toMatchObject for payload assertions
The add_job SQL function now includes actor_id in the returned payload. Using toMatchObject instead of toEqual allows the test to pass with additional fields without breaking on upstream schema changes.
1 parent f89991f commit e217e75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/e2e/__tests__/job-queue.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('SQL: Job Queue (k8s)', () => {
6161
expect(job).toBeDefined();
6262
expect(job.id).toBeDefined();
6363
expect(job.task_identifier).toBe(`${TEST_PREFIX}-basic`);
64-
expect(job.payload).toEqual({ message: 'hello from test' });
64+
expect(job.payload).toMatchObject({ message: 'hello from test' });
6565
expect(job.attempts).toBe(0);
6666
expect(job.locked_by).toBeNull();
6767
});
@@ -75,7 +75,7 @@ describe('SQL: Job Queue (k8s)', () => {
7575

7676
expect(retrieved).toBeDefined();
7777
expect(retrieved!.id).toBe(created.id);
78-
expect(retrieved!.payload).toEqual({ key: 'value' });
78+
expect(retrieved!.payload).toMatchObject({ key: 'value' });
7979
});
8080
});
8181
});

0 commit comments

Comments
 (0)