fix(util) getRegExp: multiple dots

This commit is contained in:
coderaiser 2020-04-13 18:35:26 +03:00
parent 545b5a5135
commit 798d974677
2 changed files with 9 additions and 2 deletions

View file

@ -93,6 +93,13 @@ test('util: getRegExp', (t) => {
t.end();
});
test('util: getRegExp: dots', (t) => {
const reg = getRegExp('h.*el?o.*');
t.deepEqual(reg, /^h\..*el.?o\..*$/, 'should return regexp');
t.end();
});
test('util: getRegExp: no', (t) => {
const reg = getRegExp('');