add FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS
[vid.git] / vid-webpack-master / src / app / shared / utils / util.spec.ts
1 import {Utils} from "./utils";
2 import {TestBed} from "@angular/core/testing";
3
4
5 describe('Util', () => {
6   let util: Utils;
7
8   beforeAll(done => (async () => {
9     TestBed.configureTestingModule({
10
11     });
12     await TestBed.compileComponents();
13
14     util = new Utils();
15
16   })().then(done).catch(done.fail));
17
18   test('should be defined', () => {
19     expect(util).toBeDefined();
20   });
21
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();
26   });
27
28   test('hasContents should return true if object is not undefined and not null and not empty', () => {
29     expect(Utils.hasContents("someValue")).toBeTruthy();
30   });
31 });