Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Arminmow committed Aug 24, 2024
1 parent 833d8a6 commit 4d476cb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/app/components/bread-crump/bread-crump.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BreadCrumpComponent } from './bread-crump.component';
import { ActivatedRoute } from '@angular/router';
import { of } from 'rxjs';

describe('BreadCrumpComponent', () => {
let component: BreadCrumpComponent;
let fixture: ComponentFixture<BreadCrumpComponent>;
const mockActivatedRoute = {
params: of({ id: 1 }),
snapshot: { params: { id: 1 } },
};

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [BreadCrumpComponent]
imports: [BreadCrumpComponent],
providers: [ { provide: ActivatedRoute, useValue: mockActivatedRoute },]
})
.compileComponents();

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/bread-crump/bread-crump.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgFor, NgIf } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router, RouterLink } from '@angular/router';
import {NavigationEnd, Router, RouterLink } from '@angular/router';
import { NzBreadCrumbComponent, NzBreadCrumbItemComponent } from 'ng-zorro-antd/breadcrumb';
import { filter } from 'rxjs';

Expand All @@ -12,7 +12,7 @@ import { filter } from 'rxjs';
styleUrl: './bread-crump.component.scss',
})
export class BreadCrumpComponent implements OnInit {
breadcrumbs: Array<{label: string, url: string}> = [];
breadcrumbs: {label: string, url: string}[] = [];

constructor(private router: Router) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ import { UsersTableComponent } from './users-table.component';
import { NZ_ICONS, NzIconService } from 'ng-zorro-antd/icon';
import { TeamOutline, UserAddOutline } from '@ant-design/icons-angular/icons';
import { provideHttpClient } from '@angular/common/http';
import { of } from 'rxjs';
import { ActivatedRoute } from '@angular/router';

describe('UsersTableComponent', () => {
let component: UsersTableComponent;
let fixture: ComponentFixture<UsersTableComponent>;
const mockActivatedRoute = {
params: of({ id: 1 }),
snapshot: { params: { id: 1 } },
};

beforeEach(async () => {
await TestBed.configureTestingModule({
Expand All @@ -18,7 +24,8 @@ describe('UsersTableComponent', () => {
{
provide: NZ_ICONS,
useValue: [UserAddOutline, TeamOutline]
}
},
{ provide: ActivatedRoute, useValue: mockActivatedRoute }
]
})
.compileComponents();
Expand Down

0 comments on commit 4d476cb

Please sign in to comment.