Last active
May 7, 2018 21:29
-
-
Save advorkina/8ce90a78d37087373b46955a68ced8ef to your computer and use it in GitHub Desktop.
Testing Input() properties in Angular
This file contains hidden or 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
it("should set input property 'text' equal to folder title in <custom-inline-edit/>", () => { | |
// arrange | |
component.folder = folder; | |
fixture.detectChanges(); | |
// act | |
let inlineEditElement: DebugElement = editDescriptionElement = fixture.debugElement.query( | |
By.css("custom-inline-edit")); | |
// assert | |
expect(inlineEditElement.nativeElement.attributes["ng-reflect-text"].value). | |
toBe(folder.title); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment