import AutoLink from '../../../src/core/hooks/AutoLink'; const autoLinkHook = new AutoLink({ config: {}, globalConfig: {}}); describe('core/hooks/autolink', () => { it('isLinkInHtmlAttribute', () => { const cases = [ { str: 'link in attribute', index: 9, length: 25, }, { str: "link in attribute", index: 9, length: 25, }, { str: 'link in attribute', index: 8, length: 25, }, ]; cases.forEach((item) => { expect(autoLinkHook.isLinkInHtmlAttribute(item.str, item.index, item.length)).toBe(true); }); }); });