This commit is contained in:
Timo Hocker 2020-03-30 11:10:29 +02:00
parent f921ff783e
commit 686c98ae36

View File

@ -40,3 +40,14 @@ test ('copy object', (t) => {
t.is (copy.foo, 'baz'); t.is (copy.foo, 'baz');
t.is (obj.foo, 'bar'); t.is (obj.foo, 'bar');
}); });
test ('run regex', (t) => {
const data = 'foobarfoo';
const regex = /foo/gu;
let count = 0;
util.run_regex(regex,data,(res)=>{
t.is(res[0], 'foo');
count++;
})
t.is(count, 2);
});