1 import {Utils} from "./utils";
2 import {TestBed} from "@angular/core/testing";
5 describe('Util', () => {
8 beforeAll(done => (async () => {
9 TestBed.configureTestingModule({
12 await TestBed.compileComponents();
16 })().then(done).catch(done.fail));
18 test('should be defined', () => {
19 expect(util).toBeDefined();
22 test('hasContents should return false if object is undefined or null or empty', () => {
23 expect(Utils.hasContents(undefined)).toBeFalsy();
24 expect(Utils.hasContents(null)).toBeFalsy();
25 expect(Utils.hasContents("")).toBeFalsy();
28 test('hasContents should return true if object is not undefined and not null and not empty', () => {
29 expect(Utils.hasContents("someValue")).toBeTruthy();