diff --git a/npm/ng-packs/packages/core/src/lib/tests/local-storage.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/local-storage.service.spec.ts index 204c052d21..ad51bbda2b 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/local-storage.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/local-storage.service.spec.ts @@ -13,4 +13,40 @@ describe('LocalStorageService', () => { it('should be created', () => { expect(service).toBeTruthy(); }); + + it('should be called getItem', () => { + const spy = jest.spyOn(service, 'getItem'); + service.getItem('test'); + expect(spy).toHaveBeenCalled(); + }); + + it('should be called setItem', () => { + const spy = jest.spyOn(service, 'setItem'); + service.setItem('test', 'value'); + expect(spy).toHaveBeenCalled(); + }); + + it('should be called removeItem', () => { + const spy = jest.spyOn(service, 'removeItem'); + service.removeItem('test'); + expect(spy).toHaveBeenCalled(); + }); + + it('should be called clear', () => { + const spy = jest.spyOn(service, 'clear'); + service.clear(); + expect(spy).toHaveBeenCalled(); + }); + + it('should be called key', () => { + const spy = jest.spyOn(service, 'key'); + service.key(0); + expect(spy).toHaveBeenCalled(); + }); + + it('should be called length', () => { + const spy = jest.spyOn(service, 'length', 'get'); + service.length; + expect(spy).toHaveBeenCalled(); + }); });