Skip to content

Commit

Permalink
fix: fix testt
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed May 6, 2020
1 parent d25624b commit 5151889
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 13 additions & 0 deletions src/app/presentation/reporter/reporter.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { SharedModule } from '../../shared/shared.module';
import { CustomMaterialModule } from '../../shared/custom-material.module';
import { LedgeRenderModule } from '@ledge-framework/render';
import { RouterTestingModule } from '@angular/router/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute, convertToParamMap } from '@angular/router';
import { of } from 'rxjs';

describe('ReporterComponent', () => {
let component: ReporterComponent;
Expand All @@ -13,11 +16,21 @@ describe('ReporterComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
SharedModule,
CustomMaterialModule,
LedgeRenderModule,
RouterTestingModule,
],
providers: [
{
provide: ActivatedRoute,
useValue: {
fragment: of({}),
paramMap: of(convertToParamMap({ year: '2019' })),
},
},
],
declarations: [ReporterComponent],
}).compileComponents();
}));
Expand Down
6 changes: 1 addition & 5 deletions src/app/presentation/reporter/reporter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ export class ReporterComponent implements OnInit {
currentUrl = '/report';
urlPrefix = `reports`;

constructor(
private title: Title,
private activatedRoute: ActivatedRoute,
private translate: TranslateService
) {}
constructor(private title: Title, private activatedRoute: ActivatedRoute) {}

ngOnInit(): void {
this.activatedRoute.paramMap.subscribe((p) => {
Expand Down

0 comments on commit 5151889

Please sign in to comment.