fix assertion: expect(fn1) not expect(fn1.mock)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
Fredrik Adelöw
2026-05-13 16:52:03 +02:00
parent e4ac8e2244
commit e72fcdcbdf
@@ -329,7 +329,7 @@ describe.each(databases.eachSupportedId())('TaskWorker, %s', databaseId => {
await new Promise(resolve => setTimeout(resolve, 250));
expect(fn1).toHaveBeenCalledTimes(0);
await waitForExpect(() => {
expect(fn1.mock).toHaveBeenCalled();
expect(fn1).toHaveBeenCalled();
});
// Start a second worker and make sure it waits but the first worker still works along