From f0211a0ce81263a50d3db07452eab30e4522b669 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 20 May 2022 18:08:48 +0100 Subject: [PATCH] Fixing mock. --- packages/server/__mocks__/pg.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/__mocks__/pg.ts b/packages/server/__mocks__/pg.ts index 44aeabcb38..110933ad52 100644 --- a/packages/server/__mocks__/pg.ts +++ b/packages/server/__mocks__/pg.ts @@ -14,7 +14,9 @@ module PgMock { function Client() {} Client.prototype.query = query - Client.prototype.end = jest.fn() + Client.prototype.end = jest.fn(cb => { + if (cb) cb() + }) Client.prototype.connect = jest.fn() Client.prototype.release = jest.fn()