]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/Linkifier.test.ts
Include element in validationCallback
[mirror_xterm.js.git] / src / Linkifier.test.ts
index 012b1b6869b2cc4f9b7729f5f07779c1a681fd9a..97750c946651c27a720adf7d5b2f1c517a851737 100644 (file)
@@ -53,7 +53,7 @@ describe('Linkifier', () => {
     it('should enable link if true', done => {
       addRow('test');
       linkifier.registerLinkMatcher(/test/, () => done(), {
-        validationCallback: (url, cb) => {
+        validationCallback: (url, element, cb) => {
           cb(true);
           assert.equal((<HTMLElement>rows[0].firstChild).tagName, 'A');
           setTimeout(() => clickElement(rows[0].firstChild), 0);
@@ -65,7 +65,7 @@ describe('Linkifier', () => {
     it('should disable link if false', done => {
       addRow('test');
       linkifier.registerLinkMatcher(/test/, () => assert.fail(), {
-        validationCallback: (url, cb) => {
+        validationCallback: (url, element, cb) => {
           cb(false);
           assert.equal((<HTMLElement>rows[0].firstChild).tagName, 'A');
           setTimeout(() => clickElement(rows[0].firstChild), 0);