describe('Events', () => {
afterEach(() => {
anchor.innerHTML = '';
});
test('click element', () => {
const view = new View(intervalConfig, anchor);
const spy = jest.spyOn(view, 'notify');
const element = anchor.querySelector('.slider__handle') as HTMLElement;
element.dispatchEvent(new Event('click', { bubbles: true }));
expect(spy).toHaveBeenCalled();
spy.mockRestore();
});
});