/
githubmirror
/
react-hook-form
Обзор
Документация
Войти
/
githubmirror
/
react-hook-form
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/__tests__/utils/isUndefined.test.ts
16 строк
541 B
Bill
7️⃣ V7 (#3741)
01 апр 2021, 00:14
Не верифицирован
01 апр 2021, 00:14
9555d16
Код
Авторство
О чём код?
import isUndefined from '../../utils/isUndefined'; describe('isUndefined', () => { it('should return true when it is an undefined value', () => { expect(isUndefined(undefined)).toBeTruthy(); }); it('should return false when it is not an undefined value', () => { expect(isUndefined(null)).toBeFalsy(); expect(isUndefined('')).toBeFalsy(); expect(isUndefined('undefined')).toBeFalsy(); expect(isUndefined(0)).toBeFalsy(); expect(isUndefined([])).toBeFalsy(); expect(isUndefined({})).toBeFalsy(); }); });