1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-04 23:14:56 +01:00
metamask-extension/ui/helpers/utils/common.util.test.js

27 lines
605 B
JavaScript
Raw Normal View History

import * as utils from './common.util';
describe('Common utils', () => {
describe('camelCaseToCapitalize', () => {
it('should return a capitalized string from a camel-cased string', () => {
const tests = [
2018-10-05 22:02:55 +02:00
{
test: undefined,
expected: '',
},
{
test: '',
expected: '',
},
{
test: 'thisIsATest',
expected: 'This Is A Test',
},
];
tests.forEach(({ test, expected }) => {
expect(utils.camelCaseToCapitalize(test)).toStrictEqual(expected);
});
});
});
});