misc_pterodactyl-panel/resources/scripts/lib/strings.spec.ts
2022-11-25 13:25:03 -07:00

16 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('');
});
});
});