Created
April 18, 2021 06:51
-
-
Save qkreltms/6ac4d95df2f3353cef36307b4d7664f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```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