Skip to content

Commit

Permalink
fix: fix testing
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Apr 24, 2020
1 parent 61bae97 commit 42b3606
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions src/app/presentation/practise/practise.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ 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 { BrowserTestingModule } from '@angular/platform-browser/testing';
import {
TranslateFakeLoader,
TranslateLoader,
TranslateModule,
} from '@ngx-translate/core';
import { ThinkTankComponent } from '../think-tank/think-tank.component';
import { ActivatedRoute, convertToParamMap } from '@angular/router';
import { of } from 'rxjs';

describe('PractiseComponent', () => {
let component: PractiseComponent;
Expand All @@ -14,11 +24,28 @@ describe('PractiseComponent', () => {
TestBed.configureTestingModule({
imports: [
SharedModule,
CustomMaterialModule,
LedgeRenderModule,
RouterTestingModule,
LedgeRenderModule,
CustomMaterialModule,
BrowserAnimationsModule,
BrowserTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useClass: TranslateFakeLoader,
},
}),
],
declarations: [PractiseComponent],
providers: [
{
provide: ActivatedRoute,
useValue: {
fragment: of({}),
paramMap: of(convertToParamMap({ practise: 'devops-practise' })),
},
},
],
}).compileComponents();
}));

Expand Down

0 comments on commit 42b3606

Please sign in to comment.