diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.test.tsx b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.test.tsx index 84ee4dd1a18..8d7a0bb7d44 100644 --- a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.test.tsx +++ b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.test.tsx @@ -339,6 +339,28 @@ describe('DrawerList component', () => { }) }) + it('does not fire on_change when selecting the selected item', async () => { + const on_change = jest.fn() + + render( + + ) + + // then simulate changes + keydown(40) // down + keydown(38) // up + keydown(32) // space + + await waitFor(() => { + expect(on_change).toBeCalledTimes(0) + }) + }) + it('has correct direction prop', () => { const directionTop = 'top'