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

@ -1,6 +1,6 @@
import { useRecoilCallback } from 'recoil';
import { isDefined } from '~/utils/isDefined';
import { isNonNullable } from '~/utils/isNonNullable';
import { DEFAULT_HOTKEYS_SCOPE_CUSTOM_SCOPES } from '../constants/DefaultHotkeysScopeCustomScopes';
import { currentHotkeyScopeState } from '../states/internal/currentHotkeyScopeState';
@ -30,7 +30,7 @@ export const useSetHotkeyScope = () =>
.valueOrThrow();
if (currentHotkeyScope.scope === hotkeyScopeToSet) {
if (!isDefined(customScopes)) {
if (!isNonNullable(customScopes)) {
if (
isCustomScopesEqual(
currentHotkeyScope?.customScopes,