* 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>
20 lines
519 B
TypeScript
20 lines
519 B
TypeScript
import { assertNotNull } from '~/utils/assert';
|
|
|
|
describe('assert', () => {
|
|
it('should return true for a NonNullable value', () => {
|
|
expect(assertNotNull(1)).toBeTruthy();
|
|
});
|
|
|
|
it('should return true for a NonNullable value', () => {
|
|
expect(assertNotNull('')).toBeTruthy();
|
|
});
|
|
|
|
it('should return false for a null value', () => {
|
|
expect(assertNotNull(null)).toBeFalsy();
|
|
});
|
|
|
|
it('should return false for an undefined value', () => {
|
|
expect(assertNotNull(undefined)).toBeFalsy();
|
|
});
|
|
});
|