From 6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Wed, 29 Aug 2018 17:01:32 +0300 Subject: merge from ecomp a88f0072 - Modern UI Issue-ID: VID-378 Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6 Signed-off-by: Ittay Stern --- .../src/app/shared/utils/util.spec.ts | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 vid-webpack-master/src/app/shared/utils/util.spec.ts (limited to 'vid-webpack-master/src/app/shared/utils/util.spec.ts') diff --git a/vid-webpack-master/src/app/shared/utils/util.spec.ts b/vid-webpack-master/src/app/shared/utils/util.spec.ts new file mode 100644 index 000000000..2f9142f9c --- /dev/null +++ b/vid-webpack-master/src/app/shared/utils/util.spec.ts @@ -0,0 +1,31 @@ +import {Utils} from "./utils"; +import {TestBed} from "@angular/core/testing"; + + +describe('Util', () => { + let util: Utils; + + beforeAll(done => (async () => { + TestBed.configureTestingModule({ + + }); + await TestBed.compileComponents(); + + util = new Utils(); + + })().then(done).catch(done.fail)); + + test('should be defined', () => { + expect(util).toBeDefined(); + }); + + test('hasContents should return false if object is undefined or null or empty', () => { + expect(Utils.hasContents(undefined)).toBeFalsy(); + expect(Utils.hasContents(null)).toBeFalsy(); + expect(Utils.hasContents("")).toBeFalsy(); + }); + + test('hasContents should return true if object is not undefined and not null and not empty', () => { + expect(Utils.hasContents("someValue")).toBeTruthy(); + }); +}); -- cgit 1.2.3-korg