@vertisanpro/flowbite-react
Version:
Non-Official React components built for Flowbite and Tailwind CSS
29 lines (28 loc) • 997 B
JavaScript
import { render, screen } from '@testing-library/react';
import React from 'react';
import { describe, expect, it } from 'vitest';
import { Flowbite } from '../../';
import { List } from './List';
describe('Components / List group', () => {
describe('Theme', () => {
it('should use custom classes', () => {
const theme = {
list: {
root: {
base: 'asd',
},
},
};
render(React.createElement(Flowbite, { theme: { theme } },
React.createElement(TestList, null))),
expect(listGroup()).toHaveClass('asd');
});
});
});
const TestList = () => {
return (React.createElement(List, null,
React.createElement(List.Item, null, "Settings"),
React.createElement(List.Item, null, "Messages"),
React.createElement(List.Item, null, "Download")));
};
const listGroup = () => screen.getByRole('list');