SHARE
TWEET

Untitled

a guest Jun 25th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top