Skip to content

Commit

Permalink
fix(front): fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Jan 19, 2024
1 parent df60d47 commit deb2ac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/buttons/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ describe('SelectPathButton component', () => {
require('@/tauri_cmd').openPath = openPathMock;
require('@/hooks').useTranslation = () => ({ t: tMock });

render(<SelectPathButton path="/test" setPath={jest.fn()} />);
render(<SelectPathButton path="/test" isDir setPath={jest.fn()} />);

// Click the button
fireEvent.click(screen.getByText('Select'));

// Check if openPath is called
expect(openPathMock).toHaveBeenCalledWith('/test', expect.any(Function), false);
expect(openPathMock).toHaveBeenCalled();

// Wait for the asynchronous operation to complete
await waitFor(() => {
Expand Down

0 comments on commit deb2ac6

Please sign in to comment.