mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-15 13:36:35 +02:00
Replace 'wait' with 'waitFor'
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
||||
* Copyright (C) 2019-2025 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
||||
*
|
||||
* This is free software, licensed under the GNU General Public License v3.
|
||||
* See /LICENSE for more information.
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import React from "react";
|
||||
|
||||
import { render, fireEvent, getByLabelText, wait } from "customTestRender";
|
||||
import { render, fireEvent, getByLabelText, waitFor } from "customTestRender";
|
||||
|
||||
import NumberInput from "../NumberInput";
|
||||
|
||||
@ -34,7 +34,7 @@ describe("<NumberInput/>", () => {
|
||||
it("Increase number with button", async () => {
|
||||
const increaseButton = getByLabelText(componentContainer, /Increase/);
|
||||
fireEvent.mouseDown(increaseButton);
|
||||
await wait(() =>
|
||||
await waitFor(() =>
|
||||
expect(onChangeMock).toHaveBeenCalledWith({ target: { value: 2 } })
|
||||
);
|
||||
});
|
||||
@ -42,7 +42,7 @@ describe("<NumberInput/>", () => {
|
||||
it("Decrease number with button", async () => {
|
||||
const decreaseButton = getByLabelText(componentContainer, /Decrease/);
|
||||
fireEvent.mouseDown(decreaseButton);
|
||||
await wait(() =>
|
||||
await waitFor(() =>
|
||||
expect(onChangeMock).toHaveBeenCalledWith({ target: { value: 0 } })
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user