Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. ngAfterViewInit(): void {
  2. this.offsetPopoverPosition();
  3. }
  4.  
  5. it('ngAfterViewInit() method should call offsetPopoverPosition() method', () => {
  6. const mockListener = jest.spyOn(cmp, 'offsetPopoverPosition');
  7. const spy = mockListener.mockImplementation(() => {
  8. console.log('in the mock');
  9. });
  10.  
  11. cmp.ngAfterViewInit();
  12. expect(spy).toHaveBeenCalled();
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement