1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 16:18:07 +01:00
metamask-extension/ui/helpers/utils/common.util.test.js

27 lines
610 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
{
input: undefined,
2018-10-05 22:02:55 +02:00
expected: '',
},
{
input: '',
expected: '',
},
{
input: 'thisIsATest',
expected: 'This Is A Test',
},
];
tests.forEach(({ input, expected }) => {
expect(utils.camelCaseToCapitalize(input)).toStrictEqual(expected);
});
});
});
});