From be8b928e282e9edf276be54b29387830d7f5672c Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 2 Oct 2024 11:40:48 -0500 Subject: [PATCH] tests --- .../react/src/components/BottomSheet/BottomSheet.test.tsx | 4 ++++ packages/react/src/components/BottomSheet/index.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/react/src/components/BottomSheet/BottomSheet.test.tsx b/packages/react/src/components/BottomSheet/BottomSheet.test.tsx index 0574607ab..d2b8159e9 100644 --- a/packages/react/src/components/BottomSheet/BottomSheet.test.tsx +++ b/packages/react/src/components/BottomSheet/BottomSheet.test.tsx @@ -135,6 +135,7 @@ test('should set focus to custom element when opened', () => { data-testid="bottomsheet" focusOptions={{ initialFocus: ref.current as HTMLElement }} > + ); @@ -146,6 +147,7 @@ test('should set focus to custom element when opened', () => { focusOptions={{ initialFocus: ref.current as HTMLElement }} open > + ); @@ -161,6 +163,7 @@ test('should set focus to custom ref element', () => { data-testid="bottomsheet" focusOptions={{ initialFocus: ref }} > + ); @@ -172,6 +175,7 @@ test('should set focus to custom ref element', () => { focusOptions={{ initialFocus: ref }} open > + ); diff --git a/packages/react/src/components/BottomSheet/index.tsx b/packages/react/src/components/BottomSheet/index.tsx index 5a1798f32..9e2f94238 100644 --- a/packages/react/src/components/BottomSheet/index.tsx +++ b/packages/react/src/components/BottomSheet/index.tsx @@ -34,6 +34,7 @@ const BottomSheet = forwardRef( const [labelId] = useId(1, 'bottom-sheet-label'); const handleClose = useCallback(() => { + // istanbul ignore else if (typeof onClose === 'function') { onClose(); }