Files
twenty/packages/twenty-front/src/utils/__tests__/isDefined.test.ts
Lucas Bordeau 581dfafe11 Renamed nullable utils into isDefined and isUndefinedOrNull (#4402)
* Renamed nullable utils into isDefined and isUndefinedOrNull
2024-03-11 14:28:57 +01:00

16 lines
390 B
TypeScript

import { isDefined } from '~/utils/isDefined';
describe('isDefined', () => {
it('returns true if value is not undefined nor null', () => {
expect(isDefined('')).toBe(true);
});
it('returns false if value is null', () => {
expect(isDefined(null)).toBe(false);
});
it('returns false if value is undefined', () => {
expect(isDefined(undefined)).toBe(false);
});
});