mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-23 05:09:24 +01:00
* Remove old vue 2 package * Add @lucide/vue package * Remove old vue 2 doc * Update docs * Adjust export template * Adjust vue package! * Fix tests * Format code * Update packages/vue/src/Icon.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Adjust vue package in docs * Update deadlinks --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
36 lines
862 B
TypeScript
36 lines
862 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { render } from '@testing-library/vue';
|
|
|
|
import { airVent } from './testIconNodes';
|
|
import { Icon } from '../src/lucide-vue';
|
|
|
|
describe('Using Icon Component', () => {
|
|
it('should render icon based on a iconNode', async () => {
|
|
const { container } = render(Icon, {
|
|
props: {
|
|
iconNode: airVent,
|
|
name: 'AirVent',
|
|
size: 48,
|
|
color: 'red',
|
|
absoluteStrokeWidth: true,
|
|
},
|
|
});
|
|
|
|
expect(container.firstChild).toBeDefined();
|
|
});
|
|
|
|
it('should render icon and match snapshot', async () => {
|
|
const { container } = render(Icon, {
|
|
props: {
|
|
iconNode: airVent,
|
|
name: 'AirVent',
|
|
size: 48,
|
|
color: 'red',
|
|
absoluteStrokeWidth: true,
|
|
},
|
|
});
|
|
|
|
expect(container.firstChild).toMatchSnapshot();
|
|
});
|
|
});
|