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

@ -17,7 +17,7 @@ describe('Settings On-Off Button Group', () => {
const view = render(<OnOffButtonGroup value={value} onSelect={onSelect} />)
expect(view.container).toMatchSnapshot()
const onButton = await screen.findByTestId('onOffButtonGroupOn')
await act(() => {
await act<void>(() => {
onButton.click()
})
expect(value).toBeTruthy()
@ -25,7 +25,7 @@ describe('Settings On-Off Button Group', () => {
view.rerender(<OnOffButtonGroup value={value} onSelect={onSelect} />)
expect(view.container).toMatchSnapshot()
const offButton = await screen.findByTestId('onOffButtonGroupOff')
await act(() => {
await act<void>(() => {
offButton.click()
})
expect(value).toBeFalsy()