update test

This commit is contained in:
zokutyou2@gmail.com 2021-07-13 22:13:07 +09:00
parent f0b88833c2
commit 91772456df

View File

@ -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();
});
})