import { TooltipDirective } from '@shared/directives/tooltip/tooltip.directive.ts'; import {ElementRef} from '@angular/core'; export const ui = null; export const accessibility = null; describe('Cart 2.0', () => { describe('TooltipDirective', () => { let elementRefMock: jasmine.SpyObj; let docMock: jasmine.SpyObj; let tooltipDirective: TooltipDirective; beforeEach(() => { elementRefMock = jasmine.createSpyObj('ElementRef', ['nativeElement']); docMock = jasmine.createSpyObj('any', ['documentElement']); tooltipDirective = new TooltipDirective(docMock, elementRefMock); }); it('should have TooltipDirective defined', () => { expect(tooltipDirective).toBeTruthy(); }); it('should have onMouseEnter method created', () => { expect(tooltipDirective.onMouseEnter).toBeTruthy(); }); it('should have setPosition method created', () => { expect(tooltipDirective.setPosition).toBeTruthy(); }); it('should have getOffSetWidth method created', () => { expect(tooltipDirective.getOffSetWidth).toBeTruthy(); }); }); });