diff --git a/npm/ng-packs/packages/core/src/lib/tests/internet-connection.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/internet-connection.service.spec.ts new file mode 100644 index 0000000000..397f362781 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/tests/internet-connection.service.spec.ts @@ -0,0 +1,28 @@ +import { TestBed } from '@angular/core/testing'; + +import { InternetConnectionService } from '../services/internet-connection-service'; + +describe('InternetConnectionService', () => { + let service: InternetConnectionService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(InternetConnectionService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + it('#networkStatus should return real value (true | false)', () => { + expect(typeof service.networkStatus()).toEqual('boolean') + expect(typeof !service.networkStatus()).toEqual('boolean') + }); + + it('#networkStatus$ should return real value (true | false)', () => { + service.networkStatus$.subscribe(val=>{ + expect(typeof val).toEqual('boolean') + expect(typeof !val).toEqual('boolean') + }) + }); +});