Add tests

This commit is contained in:
Daniel Imms
2017-03-31 01:48:51 -07:00
parent 08fd050c3f
commit d814009721
+15
View File
@@ -89,6 +89,21 @@ describe('Linkifier', () => {
// Allow time for the click to be performed
setTimeout(() => done(), 10);
});
it('should trigger for multiple link matches on one row', done => {
addRow('test test');
let count = 0;
linkifier.registerLinkMatcher(/test/, () => assert.fail(), {
validationCallback: (url, cb) => {
count += 1;
if (count === 2) {
done();
}
cb(false);
}
});
linkifier.linkifyRow(0);
});
});
describe('priority', () => {