mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
update test
This commit is contained in:
parent
f0b88833c2
commit
91772456df
@ -2,6 +2,7 @@ import React from 'react'
|
|||||||
import CommandBar from '../../../components/CommandBar'
|
import CommandBar from '../../../components/CommandBar'
|
||||||
import { render } from "../../test-utils"
|
import { render } from "../../test-utils"
|
||||||
import fetchMock from 'fetch-mock';
|
import fetchMock from 'fetch-mock';
|
||||||
|
import { act, waitFor } from '@testing-library/react'
|
||||||
|
|
||||||
test('CommandBar Component', async () => {
|
test('CommandBar Component', async () => {
|
||||||
fetchMock.get('./commands.json', {status: 200, body: {"commands": "foo"}})
|
fetchMock.get('./commands.json', {status: 200, body: {"commands": "foo"}})
|
||||||
@ -9,5 +10,7 @@ test('CommandBar Component', async () => {
|
|||||||
const {asFragment, store} = render(
|
const {asFragment, store} = render(
|
||||||
<CommandBar/>
|
<CommandBar/>
|
||||||
);
|
);
|
||||||
expect(asFragment()).toMatchSnapshot();
|
await waitFor(() => {
|
||||||
|
expect(asFragment()).toMatchSnapshot();
|
||||||
|
});
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user