Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
650 Bytes
import isNullOrUndefined from '../../utils/isNullOrUndefined';
describe('isNullOrUndefined', () => {
it('should return true when object is null or undefined', () => {
expect(isNullOrUndefined(null)).toBeTruthy();
expect(isNullOrUndefined(undefined)).toBeTruthy();
});
it('should return false when object is neither null nor undefined', () => {
expect(isNullOrUndefined(-1)).toBeFalsy();
expect(isNullOrUndefined(0)).toBeFalsy();
expect(isNullOrUndefined(1)).toBeFalsy();
expect(isNullOrUndefined('')).toBeFalsy();
expect(isNullOrUndefined({})).toBeFalsy();
expect(isNullOrUndefined([])).toBeFalsy();
});
});