From 973edd7578bb6ced92e955e3d756d08270c4743c Mon Sep 17 00:00:00 2001 From: "Jason M. Hasperhoven" Date: Fri, 15 Nov 2024 18:21:39 +0400 Subject: [PATCH] Fix lint --- packages/ui/src/Slider/index.test.tsx | 34 --------------------------- 1 file changed, 34 deletions(-) delete mode 100644 packages/ui/src/Slider/index.test.tsx diff --git a/packages/ui/src/Slider/index.test.tsx b/packages/ui/src/Slider/index.test.tsx deleted file mode 100644 index 3c6f9fe43..000000000 --- a/packages/ui/src/Slider/index.test.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { render, fireEvent } from '@testing-library/react'; -import { describe, expect, it, vi } from 'vitest'; -import { Slider } from '.'; - -window.ResizeObserver = vi.fn().mockImplementation(() => ({ - disconnect: vi.fn(), - observe: vi.fn(), - unobserve: vi.fn(), -})); - -describe('', () => { - it('renders correctly', () => { - const { container } = render( - , - ); - - expect(container).toHaveTextContent('left'); - expect(container).toHaveTextContent('right'); - }); - - it('handles onChange correctly', () => { - const onChange = vi.fn(); - - const { container } = render( - , - ); - - const slider = container.querySelector('[role="slider"]')!; - fireEvent.focus(slider); - fireEvent.keyDown(slider, { key: 'ArrowRight' }); - - expect(onChange).toHaveBeenCalledWith(6); - }); -});