test(util) escapeRegExp

This commit is contained in:
coderaiser 2017-08-03 16:29:24 +03:00
parent 5283af224f
commit 42c6c37ed8

View file

@ -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();
});