mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -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
|
@ -18,7 +18,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')
|
||||
act(() => {
|
||||
await act(() => {
|
||||
onButton.click()
|
||||
})
|
||||
expect(value).toBeTruthy()
|
||||
|
@ -26,7 +26,7 @@ describe('Settings On-Off Button Group', () => {
|
|||
view.rerender(<OnOffButtonGroup value={value} onSelect={onSelect} />)
|
||||
expect(view.container).toMatchSnapshot()
|
||||
const offButton = await screen.findByTestId('onOffButtonGroupOff')
|
||||
act(() => {
|
||||
await act(() => {
|
||||
offButton.click()
|
||||
})
|
||||
expect(value).toBeFalsy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue