1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 10:32:31 +01:00
Pterodactyl-Panel/resources/scripts/lib/strings.spec.ts
2022-11-25 13:25:03 -07:00

17 lines
470 B
TypeScript

import { describe, expect, it } from 'vitest';
import { capitalize } from '@/lib/strings';
describe('@/lib/strings.ts', () => {
describe('capitalize()', () => {
it('should capitalize a string', () => {
expect(capitalize('foo bar')).equals('Foo bar');
expect(capitalize('FOOBAR')).equals('Foobar');
});
it('should handle empty strings', () => {
expect(capitalize('')).equals('');
});
});
});