rtl 13 fixes for tests with type issues
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
+2
-4
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { renderHook, act } from '@testing-library/react';
|
||||
import { waitFor } from '@testing-library/react';
|
||||
|
||||
import {
|
||||
mockCalverProject,
|
||||
@@ -48,10 +47,9 @@ describe('useCreateReleaseCandidate', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
await waitFor(() => result.current.run());
|
||||
await result.current.run();
|
||||
});
|
||||
|
||||
expect(result.error).toEqual(undefined);
|
||||
expect(result.current.responseSteps).toHaveLength(6);
|
||||
});
|
||||
|
||||
@@ -67,7 +65,7 @@ describe('useCreateReleaseCandidate', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
await waitFor(() => result.current.run());
|
||||
await result.current.run();
|
||||
});
|
||||
|
||||
expect(result.current.responseSteps).toHaveLength(7);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import { renderHook, act } from '@testing-library/react';
|
||||
import { waitFor } from '@testing-library/react';
|
||||
|
||||
import {
|
||||
mockBumpedTag,
|
||||
@@ -50,10 +49,9 @@ describe('patch', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
await waitFor(() => result.current.run(mockSelectedPatchCommit));
|
||||
await result.current.run(mockSelectedPatchCommit);
|
||||
});
|
||||
|
||||
expect(result.error).toEqual(undefined);
|
||||
expect(result.current.responseSteps).toHaveLength(18);
|
||||
});
|
||||
|
||||
@@ -69,10 +67,9 @@ describe('patch', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
await waitFor(() => result.current.run(mockSelectedPatchCommit));
|
||||
await result.current.run(mockSelectedPatchCommit);
|
||||
});
|
||||
|
||||
expect(result.error).toEqual(undefined);
|
||||
expect(result.current.responseSteps).toHaveLength(19);
|
||||
expect(result.current).toMatchInlineSnapshot(`
|
||||
{
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
|
||||
import { renderHook, act } from '@testing-library/react';
|
||||
import { waitFor } from '@testing-library/react';
|
||||
|
||||
import {
|
||||
mockCalverProject,
|
||||
mockReleaseCandidateCalver,
|
||||
@@ -50,10 +48,9 @@ describe('usePromoteRc', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
await waitFor(() => result.current.run());
|
||||
await result.current.run();
|
||||
});
|
||||
|
||||
expect(result.error).toEqual(undefined);
|
||||
expect(result.current.responseSteps).toHaveLength(4);
|
||||
});
|
||||
|
||||
@@ -67,7 +64,7 @@ describe('usePromoteRc', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
await waitFor(() => result.current.run());
|
||||
await result.current.run();
|
||||
});
|
||||
|
||||
expect(result.current.responseSteps).toHaveLength(5);
|
||||
|
||||
Reference in New Issue
Block a user