mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +08:00
chore: 修几个单元测试报错 (#4272)
This commit is contained in:
parent
a4b475b8ea
commit
f12754554f
@ -205,10 +205,6 @@ test('Renderers:Action countDown', async () => {
|
||||
|
||||
let button = container.querySelector('button');
|
||||
fireEvent.click(button as HTMLButtonElement);
|
||||
|
||||
button = container.querySelector('button');
|
||||
expect(button).toBeNull();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(container.querySelector('button')).not.toBeInTheDocument();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ import {makeEnv, wait} from '../helper';
|
||||
import 'jest-canvas-mock';
|
||||
|
||||
test('Renderer:bar-code', async () => {
|
||||
const {container, getByTestId} = render(
|
||||
const {container} = render(
|
||||
amisRender(
|
||||
{
|
||||
type: 'page',
|
||||
@ -19,7 +19,9 @@ test('Renderer:bar-code', async () => {
|
||||
makeEnv({})
|
||||
)
|
||||
);
|
||||
await waitFor(() => expect(getByTestId('barcode')).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(container.querySelector('.cxd-BarCode')).toBeInTheDocument()
|
||||
);
|
||||
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user