import{jsx as _jsx}from"react/jsx-runtime";import{render,fireEvent,screen}from"@testing-library/react";import{LanguageDropdown}from"../LanguageDropdown";const mockSamples=[{key:"js",title:"JS",lang:"js"},{key:"node.js",title:"Node.JS",lang:"nodejs"}],mockActiveTab=mockSamples[0].key,mockOnChange=jest.fn();describe("LanguageDropdown",(()=>{test("LanguageDropdown renders correctly",(()=>{const{getByText:e}=render(_jsx(LanguageDropdown,{samples:mockSamples,activeTab:mockActiveTab,onChange:mockOnChange}));expect(e(mockSamples[0].title)).toBeInTheDocument()})),test("LanguageDropdown handles onChange correctly",(()=>{const{getByText:e}=render(_jsx(LanguageDropdown,{samples:mockSamples,activeTab:mockActiveTab,onChange:mockOnChange}));fireEvent.click(screen.getByText(mockSamples[0].title));const n=mockSamples[1];fireEvent.click(e(n.title)),expect(mockOnChange).toHaveBeenCalledWith(n.key)}))}));
//# sourceMappingURL=LanguageDropdown.test.js.map