mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
* Add aria hidden to lucide package * Add aria-hidden to astro package * Add tests for shared package * Fix test for props * add aria prop to lucide-solid * Add aria-hidden to lucide-vue-next * Add aria-hidden prop to angular package * Fix builds * Add notice about aria-label in docs * Format code * Update packages/svelte/tests/Icon.spec.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/lucide-svelte/tests/Icon.spec.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/shared/src/utils/hasA11yProp.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Adjusted docs * Fix import * update tests * test(shared): fix hasA11yProp unit test * fix(packages/lucide-angular): fix hasA11yProp import path (non-relative import path will not get properly resolved by ng-packagr) * Format code * Adjust aria props to root element * Format code --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Karsa <contact@karsa.org>
29 lines
834 B
TypeScript
29 lines
834 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { toKebabCase } from '../src/utils/toKebabCase';
|
|
|
|
describe('toKebabCase', () => {
|
|
it('should convert camelCase to kebab-case', () => {
|
|
expect(toKebabCase('camelCase')).toBe('camel-case');
|
|
});
|
|
|
|
it('should convert PascalCase to kebab-case', () => {
|
|
expect(toKebabCase('PascalCase')).toBe('pascal-case');
|
|
});
|
|
|
|
it('should handle strings with numbers', () => {
|
|
expect(toKebabCase('test123String')).toBe('test123-string');
|
|
});
|
|
|
|
it('should handle already kebab-case strings', () => {
|
|
expect(toKebabCase('already-kebab-case')).toBe('already-kebab-case');
|
|
});
|
|
|
|
it('should handle single lowercase word', () => {
|
|
expect(toKebabCase('word')).toBe('word');
|
|
});
|
|
|
|
it('should handle empty string', () => {
|
|
expect(toKebabCase('')).toBe('');
|
|
});
|
|
});
|