mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(package) kebabToCamelCase -> just-pascal-case
This commit is contained in:
parent
e6dee77695
commit
a86edf1497
5 changed files with 7 additions and 51 deletions
|
|
@ -6,8 +6,6 @@ const DIR = '../../';
|
|||
const UtilPath = DIR + 'common/util';
|
||||
const Util = require(UtilPath);
|
||||
const {
|
||||
getStrBigFirst,
|
||||
kebabToCamelCase,
|
||||
findObjByNameInArr,
|
||||
getRegExp,
|
||||
escapeRegExp,
|
||||
|
|
@ -38,26 +36,6 @@ test('util: getExt: no name', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('getStrBigFirst: args', (t) => {
|
||||
t.throws(getStrBigFirst, /str could not be empty!/, 'should throw when no str');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('getStrBigFirst', (t) => {
|
||||
t.equal(getStrBigFirst('hello'), 'Hello', 'should return str');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('kebabToCamelCase: args', (t) => {
|
||||
t.throws(kebabToCamelCase, /str could not be empty!/, 'should throw when no str');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('kebabToCamelCase', (t) => {
|
||||
t.equal(kebabToCamelCase('hello-world'), 'HelloWorld', 'should convert kebab to camel case');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('util: findObjByNameInArr: no array', (t) => {
|
||||
t.throws(findObjByNameInArr, /array should be array!/, 'should throw when no array');
|
||||
t.end();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue