diff options
Diffstat (limited to 'ui/app/helpers/tests/common.util.test.js')
-rw-r--r-- | ui/app/helpers/tests/common.util.test.js | 23 |
1 files changed, 23 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 00000000..891e19ef --- /dev/null +++ b/ui/app/helpers/tests/common.util.test.js @@ -0,0 +1,23 @@ +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: '', + expected: '', + }, + { + test: 'thisIsATest', + expected: 'This Is A Test', + }, + ] + + tests.forEach(({ test, expected }) => { + assert.equal(utils.camelCaseToCapitalize(test), expected) + }) + }) + }) +}) |