You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
605 B
27 lines
605 B
4 years ago
|
import * as utils from './common.util';
|
||
6 years ago
|
|
||
4 years ago
|
describe('Common utils', () => {
|
||
|
describe('camelCaseToCapitalize', () => {
|
||
|
it('should return a capitalized string from a camel-cased string', () => {
|
||
6 years ago
|
const tests = [
|
||
6 years ago
|
{
|
||
|
test: undefined,
|
||
|
expected: '',
|
||
|
},
|
||
6 years ago
|
{
|
||
|
test: '',
|
||
|
expected: '',
|
||
|
},
|
||
|
{
|
||
|
test: 'thisIsATest',
|
||
|
expected: 'This Is A Test',
|
||
|
},
|
||
4 years ago
|
];
|
||
6 years ago
|
|
||
|
tests.forEach(({ test, expected }) => {
|
||
4 years ago
|
expect(utils.camelCaseToCapitalize(test)).toStrictEqual(expected);
|
||
4 years ago
|
});
|
||
|
});
|
||
|
});
|
||
|
});
|