apphouse
Version:
Component library for React that uses observable state management and theme-able components.
25 lines (21 loc) • 750 B
text/typescript
import { camelCase } from './camelCase';
describe('camelCase', () => {
it('should convert a sentence to camel case', () => {
const sentence = 'hello world';
const expected = 'helloWorld';
const result = camelCase(sentence);
expect(result).toBe(expected);
});
it('should convert a sentence with special characters to camel case', () => {
const sentence = 'my-name-is-john';
const expected = 'myNameIsJohn';
const result = camelCase(sentence);
expect(result).toBe(expected);
});
it('should convert a sentence with numbers to camel case', () => {
const sentence = 'hello123world';
const expected = 'hello123world';
const result = camelCase(sentence);
expect(result).toBe(expected);
});
});