diff options
Diffstat (limited to 'src/app/shared/services')
-rw-r--r-- | src/app/shared/services/utilityService/utility.service.spec.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/app/shared/services/utilityService/utility.service.spec.ts b/src/app/shared/services/utilityService/utility.service.spec.ts index 80bedeb..d865f04 100644 --- a/src/app/shared/services/utilityService/utility.service.spec.ts +++ b/src/app/shared/services/utilityService/utility.service.spec.ts @@ -91,4 +91,16 @@ describe('UtilityService', () => { let obj = [{data : 'data'}]; expect(service.checkNotNull(obj)).toBe(true); })); -}); + + it('should test setTracelvl function with proper trace value', inject([UtilityService], (service: UtilityService) => { + service.setTracelvl(1); + let traceValue = localStorage.getItem("Tracelvl"); + expect(traceValue).toBe("1") + })); + + it('should test setTracelvl function with no tracevalue', inject([UtilityService], (service: UtilityService) => { + service.setTracelvl(null); + let traceValue = localStorage.getItem("Tracelvl"); + expect(traceValue).toBe("0") + })); +});
\ No newline at end of file |