| 1 |
import React from "react"; |
| 2 |
import { render, screen } from "@testing-library/react"; |
| 3 |
import { expect, test } from "vitest"; |
| 4 |
// Component |
| 5 |
import TabLayout from "./TabLayout"; |
| 6 |
|
| 7 |
const testTabs = [ |
| 8 |
<div key="1">Test Tab</div>, |
| 9 |
<div key="2">Test Tab</div>, |
| 10 |
<div key="3">Test Tab</div>, |
| 11 |
]; |
| 12 |
|
| 13 |
test("should display the TabLayout with required props", () => { |
| 14 |
render(<TabLayout id="test-tab">{testTabs}</TabLayout>); |
| 15 |
expect(screen.getAllByText("Test Tab")).toHaveLength(3); |
| 16 |
}); |