diff --git a/src/compat/string/capitalize.spec.ts b/src/compat/string/capitalize.spec.ts new file mode 100644 index 00000000..03f7a4c1 --- /dev/null +++ b/src/compat/string/capitalize.spec.ts @@ -0,0 +1,10 @@ +import { describe, it, expect } from 'vitest'; +import { capitalize } from '../../string/capitalize'; + +describe('capitalize', () => { + it('should capitalize the first character of a string', () => { + expect(capitalize('fred')).toBe('Fred'); + expect(capitalize('Fred')).toBe('Fred'); + expect(capitalize(' fred')).toBe(' fred'); + }); +});