add response to fetchMock

This commit is contained in:
zokutyou2@gmail.com 2021-07-13 21:54:55 +09:00
parent 6670dc0666
commit f0b88833c2

View File

@ -4,7 +4,7 @@ import { render } from "../../test-utils"
import fetchMock from 'fetch-mock';
test('CommandBar Component', async () => {
fetchMock.get('./commands.json', {status: 200})
fetchMock.get('./commands.json', {status: 200, body: {"commands": "foo"}})
const {asFragment, store} = render(
<CommandBar/>