Last active
May 23, 2019 21:26
-
-
Save krishna-acondy/6f55527317ba3dd34e6fbea228064bb8 to your computer and use it in GitHub Desktop.
Angular Unit Testing - TodosComponent
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('TodosComponent', () => { | |
let component: TodosComponent; | |
let fixture: ComponentFixture<TodosComponent>; | |
beforeEach(async(() => { | |
TestBed.configureTestingModule({ | |
declarations: [ TodosComponent ], | |
providers: [ | |
{ provide: TodoService, useClass: TodoServiceMock } | |
] | |
}) | |
.compileComponents(); | |
})); | |
beforeEach(() => { | |
fixture = TestBed.createComponent(TodosComponent); | |
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