Skip to content

Commit 812d487

Browse files
committed
fine tune tests
1 parent 5b71c30 commit 812d487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/features/comp/EditorUpload.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test('preparePasteAsMarkdownLink', () => {
1818
expect(pasteAsMarkdownLink({value: 'foo', selectionStart: 0, selectionEnd: 0}, 'https://gitea.com')).toBeNull();
1919
expect(pasteAsMarkdownLink({value: 'foo', selectionStart: 0, selectionEnd: 3}, 'bar')).toBeNull();
2020
expect(pasteAsMarkdownLink({value: 'foo', selectionStart: 0, selectionEnd: 3}, 'https://gitea.com')).toBe('[foo](https://gitea.com)');
21-
expect(pasteAsMarkdownLink({value: '(x)', selectionStart: 0, selectionEnd: 3}, 'https://gitea.com')).toBe('[(x)](https://gitea.com)');
21+
expect(pasteAsMarkdownLink({value: '..(url)', selectionStart: 3, selectionEnd: 6}, 'https://gitea.com')).toBe('[url](https://gitea.com)');
2222
expect(pasteAsMarkdownLink({value: '[](url)', selectionStart: 3, selectionEnd: 6}, 'https://gitea.com')).toBeNull();
2323
expect(pasteAsMarkdownLink({value: 'https://example.com', selectionStart: 0, selectionEnd: 19}, 'https://gitea.com')).toBeNull();
2424
});

0 commit comments

Comments
 (0)