fix(frontend): Add generic type to act calls to trigger promise generation

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-12-24 14:36:05 +01:00
parent e5359a69ca
commit 9c3858797f
6 changed files with 11 additions and 11 deletions

View file

@ -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')
await act(() => {
await act<void>(() => {
button.click()
})
await waitFor(async () => {
@ -92,7 +92,7 @@ describe('create non existing note hint', () => {
const onNoteCreatedCallback = jest.fn()
const view = render(<CreateNonExistingNoteHint onNoteCreated={onNoteCreatedCallback}></CreateNonExistingNoteHint>)
const button = await screen.findByTestId('createNoteButton')
await act(() => {
await act<void>(() => {
button.click()
})
await waitFor(async () => {
@ -107,7 +107,7 @@ describe('create non existing note hint', () => {
const onNoteCreatedCallback = jest.fn()
const view = render(<CreateNonExistingNoteHint onNoteCreated={onNoteCreatedCallback}></CreateNonExistingNoteHint>)
const button = await screen.findByTestId('createNoteButton')
await act(() => {
await act<void>(() => {
button.click()
})
await waitFor(async () => {