overflow-webapp/src/app/commons/service/rpc.service.spec.ts
crusader 3293add02f ing
2018-03-11 20:54:56 +09:00

28 lines
653 B
TypeScript

import { TestBed, inject } from '@angular/core/testing';
import { RPCService } from './rpc.service';
describe('RPCService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [RPCService]
});
});
it('should be created', inject([RPCService], (service: RPCService) => {
expect(service).toBeTruthy();
}));
it('apiService connect to server', inject([RPCService], (service: RPCService) => {
service.connect();
service.getConnectionStatus().subscribe(
(isConnected: boolean) => {
console.log('isConnected:' + isConnected);
}
);
expect(service).toBeTruthy();
}));
});