diff --git a/__tests__/findUserPdl.spec.ts b/__tests__/findUserPdl.spec.js similarity index 94% rename from __tests__/findUserPdl.spec.ts rename to __tests__/findUserPdl.spec.js index 56fcfb8bfc635495e96c32d736340cc34779b4ae..92af03b8ff5e0050fd53a95c3e354fe383e7750a 100644 --- a/__tests__/findUserPdl.spec.ts +++ b/__tests__/findUserPdl.spec.js @@ -2,15 +2,14 @@ const { errors } = require('cozy-konnector-libs') const { findUserPdl } = require('../src/findUserPdl') const xml2js = require('xml2js') -var mockParsePdl: jest.Mock +var mockParsePdl // Function to mock in order to test findUserPdl() jest.mock('../src/parsing', () => ({ - parseUserPdl: mockParsePdl = jest.fn(), + parseUserPdl: (mockParsePdl = jest.fn()), })) // Dependencies - jest.mock('easy-soap-request', () => jest.fn().mockResolvedValue({ response: { @@ -23,7 +22,6 @@ jest.mock('../src/requests/sge', () => ({ rechercherPoint: jest.fn().mockResolvedValue('response'), })) -//OK jest.spyOn(xml2js, 'parseStringPromise').mockResolvedValue('response') describe('recherchePoint', () => {