mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-21 22:58:24 +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 { render } from "../../test-utils"
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { act, waitFor } from '@testing-library/react'
|
||||
|
||||
test('CommandBar Component', async () => {
|
||||
fetchMock.get('./commands.json', {status: 200, body: {"commands": "foo"}})
|
||||
@ -9,5 +10,7 @@ test('CommandBar Component', async () => {
|
||||
const {asFragment, store} = render(
|
||||
<CommandBar/>
|
||||
);
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
await waitFor(() => {
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
});
|
||||
})
|
Loading…
Reference in New Issue
Block a user