From 50d91f998d0dc228c1d5dac7966df89d6c3fe6c4 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Thu, 4 Oct 2018 19:26:41 -0700 Subject: Translate method names in the transaction list only when applicable --- ui/app/helpers/tests/common.util.test.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ui/app/helpers/tests/common.util.test.js (limited to 'ui/app/helpers/tests') 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..891e19ef5 --- /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) + }) + }) + }) +}) -- cgit