Compare commits

...

2 Commits

Author SHA1 Message Date
649e70b200 add mutate script 2020-03-30 11:11:04 +02:00
686c98ae36 add test 2020-03-30 11:10:29 +02:00
2 changed files with 13 additions and 1 deletions

View File

@ -15,6 +15,7 @@
"scripts": {
"lint": "eslint .",
"test": "nyc ava",
"ci": "yarn && node jenkins.js"
"ci": "yarn && node jenkins.js",
"mutate": "stryker run"
}
}

View File

@ -40,3 +40,14 @@ test ('copy object', (t) => {
t.is (copy.foo, 'baz');
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);
});