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

28 lines
636 B
JavaScript
Raw Normal View History

import * as utils from './common.util'
import assert from 'assert'
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.equal(utils.camelCaseToCapitalize(test), expected)
})
})
})
})