1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Lexical: Updated tests after link changes

This commit is contained in:
Dan Brown
2025-07-25 14:25:02 +01:00
parent c54101c603
commit d145efb6f6
2 changed files with 0 additions and 24 deletions

View File

@ -273,18 +273,6 @@ describe('LexicalAutoAutoLinkNode tests', () => {
}); });
}); });
test('AutoLinkNode.createDOM() sanitizes javascript: URLs', async () => {
const {editor} = testEnv;
await editor.update(() => {
// eslint-disable-next-line no-script-url
const autoLinkNode = new AutoLinkNode('javascript:alert(0)');
expect(autoLinkNode.createDOM(editorConfig).outerHTML).toBe(
'<a href="about:blank" class="my-autolink-class"></a>',
);
});
});
test('AutoLinkNode.updateDOM()', async () => { test('AutoLinkNode.updateDOM()', async () => {
const {editor} = testEnv; const {editor} = testEnv;

View File

@ -218,18 +218,6 @@ describe('LexicalLinkNode tests', () => {
}); });
}); });
test('LinkNode.createDOM() sanitizes javascript: URLs', async () => {
const {editor} = testEnv;
await editor.update(() => {
// eslint-disable-next-line no-script-url
const linkNode = new LinkNode('javascript:alert(0)');
expect(linkNode.createDOM(editorConfig).outerHTML).toBe(
'<a href="about:blank" class="my-link-class"></a>',
);
});
});
test('LinkNode.updateDOM()', async () => { test('LinkNode.updateDOM()', async () => {
const {editor} = testEnv; const {editor} = testEnv;