Skip to content

Commit af17c35

Browse files
committed
Fixed without search query test
1 parent bb77d4f commit af17c35

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/components/UI/UserPicker/UserPicker.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ jest.mock('axios');
88

99
describe('UserPicker Component', () => {
1010
const mockOnChange = jest.fn();
11-
const mockBuildUrl = jest.fn();
1211

1312
const mockUser = {
1413
name: { value: 'John Doe' },
@@ -178,13 +177,10 @@ describe('UserPicker Component', () => {
178177
});
179178
});
180179

181-
// Testing buildUrl with no search query
182-
183180
test('builds URL correctly without search query', async () => {
184181
render(<UserPicker value={mockUser} onChange={mockOnChange} />);
185182
const input = screen.getByRole('textbox');
186-
fireEvent.change(input, { target: { value: '' } });
187-
fireEvent.click(input);
183+
fireEvent.change(input, { target: { value: ' ' } });
188184

189185
await waitFor(() => {
190186
expect(axios.get).toHaveBeenCalledWith(expect.stringContaining('^nameISNOTEMPTY'));

0 commit comments

Comments
 (0)