Created
May 23, 2019 20:47
-
-
Save krishna-acondy/7f2ee7bb88e09c3f7993c88e08500ea9 to your computer and use it in GitHub Desktop.
Angular Unit Testing - DashboardComponent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('DashboardComponent', () => { | |
let component: DashboardComponent; | |
let fixture: ComponentFixture<DashboardComponent>; | |
beforeEach(async(() => { | |
TestBed.configureTestingModule({ | |
declarations: [ | |
DashboardComponent, | |
TodosComponent | |
], | |
providers: [ | |
{ provide: DashboardService, useClass: DashboardServiceMock }, | |
{ provide: TodoService, useClass: TodoServiceMock } | |
] | |
}) | |
.compileComponents(); | |
})); | |
beforeEach(() => { | |
fixture = TestBed.createComponent(DashboardComponent); | |
component = fixture.componentInstance; | |
fixture.detectChanges(); | |
}); | |
it('should create', () => { | |
expect(component).toBeTruthy(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment