From 190c44b755f3ebf8f7b1baa4bdbf4d073581e3eb Mon Sep 17 00:00:00 2001
From: miracles1919 <516571350@qq.com>
Date: Wed, 28 Jun 2023 17:09:26 +0800
Subject: [PATCH] test: fix failed test
---
.../cascade-picker-view/tests/cascade-picker-view.test.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/cascade-picker-view/tests/cascade-picker-view.test.tsx b/src/components/cascade-picker-view/tests/cascade-picker-view.test.tsx
index b66b8c5d91..09ba37d2bc 100644
--- a/src/components/cascade-picker-view/tests/cascade-picker-view.test.tsx
+++ b/src/components/cascade-picker-view/tests/cascade-picker-view.test.tsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react'
-import { render, testA11y, fireEvent, waitFor, actSleep } from 'testing'
+import { render, testA11y, fireEvent, actSleep, act } from 'testing'
import CascadePickerView from '..'
import { options } from '../demos/options-data'
@@ -7,7 +7,9 @@ const classPrefix = `adm-picker-view`
describe('CascadePickerView', () => {
test('a11y', async () => {
- await waitFor(() => testA11y())
+ await act(async () => {
+ await testA11y()
+ })
})
test('controlled mode', async () => {