Skip to content

Instantly share code, notes, and snippets.

@qkreltms
Created April 18, 2021 06:51
Show Gist options
  • Select an option

  • Save qkreltms/6ac4d95df2f3353cef36307b4d7664f7 to your computer and use it in GitHub Desktop.

Select an option

Save qkreltms/6ac4d95df2f3353cef36307b4d7664f7 to your computer and use it in GitHub Desktop.
```js
test('should shows text', async () => {
nock(`http://localhost:3333`)
.post('/')
.reply(200, { message: 'test', status: 200 })
render(<App />);
// input에 값을 넣어준다.
fireEvent.change(screen.getByTestId('uploadButton'), {
target: { files: [{ name: 'test.nii' }] },
})
await waitFor(() => expect(screen.getByText('test')).toBeDefined())
});
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment