test: improve utils coverage (#4230)

* test: improve utils coverage

* refactor: review - rename isDefined to isNonNullable, update tests and return statement
This commit is contained in:
Thaïs
2024-02-29 13:03:52 -03:00
committed by GitHub
parent 6ec0e5e995
commit 30df6c10ea
85 changed files with 396 additions and 240 deletions

View File

@ -20,7 +20,7 @@ import { MOBILE_VIEWPORT } from '@/ui/theme/constants/MobileViewport';
import { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope';
import { VIEWS_DROPDOWN_ID } from '@/views/constants/ViewsDropdownId';
import { useViewBar } from '@/views/hooks/useViewBar';
import { assertNotNull } from '~/utils/assert';
import { isNonNullable } from '~/utils/isNonNullable';
import { useViewScopedStates } from '../hooks/internal/useViewScopedStates';
@ -161,7 +161,7 @@ export const ViewsDropdownButton = ({
handleDeleteViewButtonClick(event, view.id),
}
: null,
].filter(assertNotNull)}
].filter(isNonNullable)}
onClick={() => handleViewSelect(view.id)}
LeftIcon={IconList}
text={view.name}