"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("@testing-library/react"),LanguageDropdown_1=require("../LanguageDropdown"),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}=(0,react_1.render)((0,jsx_runtime_1.jsx)(LanguageDropdown_1.LanguageDropdown,{samples:mockSamples,activeTab:mockActiveTab,onChange:mockOnChange}));expect(e(mockSamples[0].title)).toBeInTheDocument()})),test("LanguageDropdown handles onChange correctly",(()=>{const{getByText:e}=(0,react_1.render)((0,jsx_runtime_1.jsx)(LanguageDropdown_1.LanguageDropdown,{samples:mockSamples,activeTab:mockActiveTab,onChange:mockOnChange}));react_1.fireEvent.click(react_1.screen.getByText(mockSamples[0].title));const t=mockSamples[1];react_1.fireEvent.click(e(t.title)),expect(mockOnChange).toHaveBeenCalledWith(t.key)}))}));
//# sourceMappingURL=LanguageDropdown.test.js.map