diff --git a/packages/daf-url/src/__tests__/message-handler.test.ts b/packages/daf-url/src/__tests__/message-handler.test.ts index 7c12a6482..fb0e53bf3 100644 --- a/packages/daf-url/src/__tests__/message-handler.test.ts +++ b/packages/daf-url/src/__tests__/message-handler.test.ts @@ -6,16 +6,9 @@ fetchMock.enableMocks() describe('daf-url', () => { const messageHandler = new UrlMessageHandler() - const agent = new Agent({ - identityProviders: [], - serviceControllers: [], - didResolver: { resolve: jest.fn() }, - messageHandler, - }) - it('should reject unknown message type', async () => { const message = new Message({ raw: 'test', metaData: [{ type: 'test' }] }) - expect(messageHandler.handle(message, agent)).rejects.toEqual('Unsupported message type') + expect(messageHandler.handle(message, null)).rejects.toEqual('Unsupported message type') }) it('should transform message after standard URL', async () => { @@ -29,7 +22,7 @@ describe('daf-url', () => { }, ], }) - expect(messageHandler.handle(message, agent)).rejects.toEqual('Unsupported message type') + expect(messageHandler.handle(message, null)).rejects.toEqual('Unsupported message type') expect(message.raw).toEqual(JWT) }) @@ -38,7 +31,7 @@ describe('daf-url', () => { fetchMock.mockResponse('mockbody') expect.assertions(2) try { - await messageHandler.handle(message, agent) + await messageHandler.handle(message, null) } catch (e) { expect(e).toMatch('Unsupported message type') }