Created
July 30, 2016 15:19
-
-
Save JeremyLikness/c0b2d171b70a42e26dfc4cad2a6de73a to your computer and use it in GitHub Desktop.
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
| describe('Component: Console', () => { | |
| it('should create an instance', () => { | |
| let component = new ConsoleComponent(); | |
| expect(component).toBeTruthy(); | |
| }); | |
| it('should set the scrollTop to the scrollHeight on changes', (done) => { | |
| let component = new ConsoleComponent(); | |
| let div = { | |
| scrollTop: 20, | |
| scrollHeight: 100 | |
| }; | |
| let element: ElementRef = { | |
| nativeElement: div | |
| }; | |
| component.consoleDiv = element; | |
| component.ngOnChanges(); | |
| setTimeout(() => { | |
| expect(div.scrollTop).toEqual(div.scrollHeight); | |
| done(); | |
| },0); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment