mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(util) escapeRegExp
This commit is contained in:
parent
5283af224f
commit
42c6c37ed8
1 changed files with 11 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ const {
|
|||
kebabToCamelCase,
|
||||
findObjByNameInArr,
|
||||
getRegExp,
|
||||
escapeRegExp,
|
||||
} = Util;
|
||||
|
||||
test('getExt: no extension', (t) => {
|
||||
|
|
@ -102,3 +103,13 @@ test('util: getRegExp', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('util: escapeRegExp: no str', (t) => {
|
||||
t.equal(escapeRegExp(1), 1, 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('util: escapeRegExp', (t) => {
|
||||
t.equal(escapeRegExp('#hello'), '\\#hello', 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue