mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 23:24:46 -04:00
fix(frontend): Await act calls in tests
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
2206349415
commit
614374768a
6 changed files with 11 additions and 11 deletions
|
@ -77,7 +77,7 @@ describe('create non existing note hint', () => {
|
|||
const onNoteCreatedCallback = jest.fn()
|
||||
const view = render(<CreateNonExistingNoteHint onNoteCreated={onNoteCreatedCallback}></CreateNonExistingNoteHint>)
|
||||
const button = await screen.findByTestId('createNoteButton')
|
||||
act(() => {
|
||||
await act(() => {
|
||||
button.click()
|
||||
})
|
||||
await screen.findByTestId('loadingMessage')
|
||||
|
@ -90,7 +90,7 @@ describe('create non existing note hint', () => {
|
|||
const onNoteCreatedCallback = jest.fn()
|
||||
const view = render(<CreateNonExistingNoteHint onNoteCreated={onNoteCreatedCallback}></CreateNonExistingNoteHint>)
|
||||
const button = await screen.findByTestId('createNoteButton')
|
||||
act(() => {
|
||||
await act(() => {
|
||||
button.click()
|
||||
})
|
||||
await screen.findByTestId('noteCreated')
|
||||
|
@ -103,7 +103,7 @@ describe('create non existing note hint', () => {
|
|||
const onNoteCreatedCallback = jest.fn()
|
||||
const view = render(<CreateNonExistingNoteHint onNoteCreated={onNoteCreatedCallback}></CreateNonExistingNoteHint>)
|
||||
const button = await screen.findByTestId('createNoteButton')
|
||||
act(() => {
|
||||
await act(() => {
|
||||
button.click()
|
||||
})
|
||||
await screen.findByTestId('failedMessage')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue