Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
Update Cliient call asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Feb 1, 2021
1 parent 5b291b7 commit 9856cd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/postgres/vm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ test('posthog in runEvery', async () => {
expect(response).toBe('haha')

expect(Client).toHaveBeenCalledTimes(2)
expect((Client as any).mock.calls[0][1]).toEqual(mockServer.PLUGINS_CELERY_QUEUE)
expect((Client as any).mock.calls[0][1]).toEqual(mockServer.CELERY_DEFAULT_QUEUE) // webhook to celery queue
expect((Client as any).mock.calls[1][1]).toEqual(mockServer.PLUGINS_CELERY_QUEUE) // events out to start of plugin

const mockClientInstance = (Client as any).mock.instances[0]
const mockSendTask = mockClientInstance.sendTask
Expand Down Expand Up @@ -751,7 +752,8 @@ test('posthog in runEvery with timestamp', async () => {
expect(response).toBe('haha')

expect(Client).toHaveBeenCalledTimes(2)
expect((Client as any).mock.calls[0][1]).toEqual(mockServer.PLUGINS_CELERY_QUEUE)
expect((Client as any).mock.calls[0][1]).toEqual(mockServer.CELERY_DEFAULT_QUEUE) // webhook to celery queue
expect((Client as any).mock.calls[1][1]).toEqual(mockServer.PLUGINS_CELERY_QUEUE) // events out to start of plugin

const mockClientInstance = (Client as any).mock.instances[0]
const mockSendTask = mockClientInstance.sendTask
Expand Down

0 comments on commit 9856cd4

Please sign in to comment.