summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/utils/util.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/utils/util.spec.ts')
-rw-r--r--vid-webpack-master/src/app/shared/utils/util.spec.ts31
1 files changed, 31 insertions, 0 deletions
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();
+ });
+});