Skip to content
Snippets Groups Projects
Commit dfff97e4 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix: tests

parent 6d7c24a2
No related branches found
No related tags found
2 merge requests!12Feat/donnes tech debut contrat,!10Feat/rechercher point
Pipeline #39780 failed
......@@ -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', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment