Skip to content

Commit

Permalink
retour lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ornella452 committed Nov 26, 2024
1 parent 36986a5 commit 39e0a32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/views/aide-candidat/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

function Actions() {

const urlFormConseiller = import.meta.env.VITE_APP_FORMS_URL + '/conseiller/new';
const urlFormConseiller = '/nouveau-formulaire-conseiller';

return (
<div className="fr-container fr-col-lg-5 fr-col-xs-12 fr-mb-10w" style={{ textAlign: 'center' }}>
Expand Down
14 changes: 7 additions & 7 deletions src/views/candidature-conseiller/CandidatureConseiller.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@ describe('candidature conseiller', () => {
it('quand je remplis le formulaire et que je saisi mon lieu d’habitation alors la recherche est lancer à partir de 3 caractères', async () => {
// GIVEN
vi.useFakeTimers();
const searchByNameMock = vi.fn();
vi.spyOn(useGeoApi, "useGeoApi").mockImplementation(() => ({
searchByName: searchByNameMock,
const searchByNameSpy = vi.fn();
vi.spyOn(useGeoApi, 'useGeoApi').mockImplementation(() => ({
searchByName: searchByNameSpy,
}));

// WHEN
Expand All @@ -740,16 +740,16 @@ describe('candidature conseiller', () => {
// THEN
fireEvent.change(adresse, { target: { value: '9' } });
vi.advanceTimersByTime(300);
expect(searchByNameMock).toBeCalledTimes(0);
expect(searchByNameSpy).toHaveBeenCalledTimes(0);
fireEvent.change(adresse, { target: { value: '93' } });
vi.advanceTimersByTime(300);
expect(searchByNameMock).toBeCalledTimes(0);
expect(searchByNameSpy).toHaveBeenCalledTimes(0);
fireEvent.change(adresse, { target: { value: '931' } });
vi.advanceTimersByTime(300);
expect(searchByNameMock).toBeCalledTimes(1);
expect(searchByNameSpy).toHaveBeenCalledTimes(1);
fireEvent.change(adresse, { target: { value: '93100' } });
vi.advanceTimersByTime(300);
expect(searchByNameMock).toBeCalledTimes(2);
expect(searchByNameSpy).toHaveBeenCalledTimes(2);

vi.useRealTimers();
});
Expand Down

0 comments on commit 39e0a32

Please sign in to comment.