Skip to content

Commit

Permalink
♻️(frontend) Joanie api client load in test
Browse files Browse the repository at this point in the history
Joanie's api client shouldn't be loaded on test that don't use it.
  • Loading branch information
rlecellier committed Mar 7, 2024
1 parent 4db23ee commit fcd2806
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/frontend/js/utils/test/render.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { RenderResult, screen, render as testingLibraryRender } from '@testing-library/react';
import React, { ReactElement } from 'react';
import React, { ReactElement, lazy } from 'react';
import { Nullable } from 'types/utils';
import { AppWrapperProps } from './wrappers/types';
import { JoanieAppWrapper } from './wrappers/JoanieAppWrapper';

const JoanieAppWrapper = lazy(() => import('./wrappers/JoanieAppWrapper'));

// ------- setup -------

Expand Down
4 changes: 3 additions & 1 deletion src/frontend/js/utils/test/wrappers/JoanieAppWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const setupJoanieSession = () => {
};
};

export const JoanieAppWrapper = ({
const JoanieAppWrapper = ({
children,
intlOptions,
queryOptions,
Expand All @@ -35,3 +35,5 @@ export const JoanieAppWrapper = ({
</BaseJoanieAppWrapper>
);
};

export default JoanieAppWrapper;

0 comments on commit fcd2806

Please sign in to comment.