Add jest tests for twenty-front (#2983)

* Add jest tests for twenty-front

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix tests

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
gitstart-twenty
2023-12-15 17:53:20 +08:00
committed by GitHub
parent af9d3fb217
commit 5f7442cf23
27 changed files with 693 additions and 2 deletions

View File

@ -0,0 +1,19 @@
import { isDefined } from '~/utils/isDefined';
describe('isDefined', () => {
it('should return true for a NonNullable value', () => {
expect(isDefined(1)).toBe(true);
});
it('should return true for a NonNullable value', () => {
expect(isDefined('')).toBe(true);
});
it('should return false for a null value', () => {
expect(isDefined(null)).toBe(false);
});
it('should return false for an undefined value', () => {
expect(isDefined(undefined)).toBe(false);
});
});