Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Discy Latest Questions

  • 0

I am new to angular development and more new towards unit testing using jasmine. I have created a component to sow a dialog using angular material MatDialogRef, MAT_DIALOG_DATA from @angular/material. The component is working fine but the Unit testing is ...

  • 0

I have a problem mocking a component with providers in Angular 4. Here is the code : import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/core/platform-browser'; import { DebugElement } from '@angular/core'; import { FormsModule, ReactiveFormsModule, ...

  • 0

I have a service (ChildService) which depends on another service (InteractWithServerService). The latter service (InteractWithServerService) is used to make server calls and return an observable of “any” type. For simplicity let’s assume it returns an observable. I am trying to ...

  • 0

I am testing services with an Http dependency. Every test looks like this : import { TestBed, async, inject } from '@angular/core/testing'; import { ValidationService } from './validation.service'; import { HttpModule, Http, Response, ResponseOptions, RequestOptions, Headers, XHRBackend } from '@angular/http'; import { MockBackend, MockConnection } from ...

  • 0

Let’s say I have a service that makes use of HttpClient, @Injectable() export class MyService { constructor(protected httpClient: HttpClient) { .. } } And then a component that makes use of this service. @Component({ selector: 'my-component' })export class SendSmsComponent { constructor(private MyService) { ...