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 am importing and using HttpClient in a service as follows: import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http';@Injectable({ providedIn: 'root', }) export class MyService { constructor(private http: HttpClient) { }getData() { ...

  • 0

I have an Angular 6 app and writing some unit tests trying to determine if an element is visible or not based solely on the boolean result of an *ngIf directive. Markup: <div class="header" *ngIf="show"> <div>...</div> </div> spec file: it('should hide contents if show ...

  • 0

I have an angular CLI project set up. I’ve made a form that uses angular material components, like <md-card>. I’m just starting out with writing my first Karma/Jasmine unit test, following the steps in the angular docs. This is my component template: <md-card [ngClass]="'dialog-card'"> <md-card-title ...

  • 0

I have referred the following link to get the answers, but I couldn’t find any working solution for my scenario. Error: (SystemJS) Can’t resolve all parameters for ActivatedRoute: (?, ?, ?, ?, ?, ?, ?, ?) Therefore, I have been trying ...

  • 0

I have a problem with an unit test in angular 5 with Jasmine and Karma. The error is: “Can’t bind to ‘fruits’ since it isn’t a known property of ‘my-component2′”. The unit test code is: src/app/components/my-component1/my-component1.component.spec.ts: import { TestBed, inject, ComponentFixture, async} from '@angular/core/testing'; import ...

  • 0

I’m getting following error when I try to test an angular component: Error while running jest tests: Can't bind to 'matMenuTriggerFor' since it isn't a known property of 'button'.Here is my html: <button mat-button [matMenuTriggerFor]="menu">Menu</button> <mat-menu #menu="matMenu"> <button mat-menu-item>Item 1</button> <button mat-menu-item>Item ...

close