diff options
Diffstat (limited to 'ui/app/helpers/tests/common.util.test.js')
-rw-r--r-- | ui/app/helpers/tests/common.util.test.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/app/helpers/tests/common.util.test.js b/ui/app/helpers/tests/common.util.test.js new file mode 100644 index 000000000..a52b91a10 --- /dev/null +++ b/ui/app/helpers/tests/common.util.test.js @@ -0,0 +1,27 @@ +import * as utils from '../common.util' +import assert from 'assert' + +describe('Common utils', () => { + describe('camelCaseToCapitalize', () => { + it('should return a capitalized string from a camel-cased string', () => { + const tests = [ + { + test: undefined, + expected: '', + }, + { + test: '', + expected: '', + }, + { + test: 'thisIsATest', + expected: 'This Is A Test', + }, + ] + + tests.forEach(({ test, expected }) => { + assert.equal(utils.camelCaseToCapitalize(test), expected) + }) + }) + }) +}) |