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

28 lines
650 B
JavaScript
Raw Normal View History

import assert from 'assert';
import * as utils from './common.util';
describe('Common utils', function () {
describe('camelCaseToCapitalize', function () {
it('should return a capitalized string from a camel-cased string', function () {
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 }) => {
assert.strictEqual(utils.camelCaseToCapitalize(test), expected);
});
});
});
});