mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(util) getRegExp
This commit is contained in:
parent
e0a656864e
commit
5283af224f
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ const {
|
|||
getStrBigFirst,
|
||||
kebabToCamelCase,
|
||||
findObjByNameInArr,
|
||||
getRegExp,
|
||||
} = Util;
|
||||
|
||||
test('getExt: no extension', (t) => {
|
||||
|
|
@ -94,3 +95,10 @@ test('util: findObjByNameInArr: array', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('util: getRegExp', (t) => {
|
||||
const reg = getRegExp('hel?o.*');
|
||||
|
||||
t.deepEqual(reg, RegExp('^hel.?\\..*$'), 'should return regexp');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue