-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup and fix short-mentions tests
- Loading branch information
Showing
2 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -697,6 +697,7 @@ test('Test url replacements', () => { | |
'@test.com <a href="https://test.com" target="_blank" rel="noreferrer noopener">test.com</a> ' + | ||
'@test.com @test.com '; | ||
|
||
// Fixme [short-mention] this errors on "test.com</a> @test.com @test.com <a" - probably @test.com should be a legit short-mention candidate | ||
expect(parser.replace(urlTestStartString)).toBe(urlTestReplacedString); | ||
}); | ||
|
||
|
@@ -931,7 +932,7 @@ test('Test urls autolinks correctly', () => { | |
}, | ||
]; | ||
|
||
// Fixme @expensify.com is a now correct "possible" short mention | ||
// Fixme [short-mention] @expensify.com should now be considered a short-mention "candidate" | ||
testCases.forEach((testCase) => { | ||
expect(parser.replace(testCase.testString)).toBe(testCase.resultString); | ||
}); | ||
|
@@ -1321,10 +1322,6 @@ test('Test for user mention with @[email protected]', () => { | |
const resultString = '<mention-user>@[email protected]</mention-user>'; | ||
expect(parser.replace(testString)).toBe(resultString); | ||
}); | ||
// Todo | ||
// popraw psujący się @here testy | ||
// Todo wszystkie edge kejsy w których short mention jest ambiguous | ||
// short-mention -> possible-short-mention | ||
|
||
test('Test for short mention mention with @[email protected]', () => { | ||
const testString = '@john.doe'; | ||
|
@@ -1515,6 +1512,7 @@ test('Test for @here mention with italic, bold and strikethrough styles', () => | |
' @here!' + | ||
' @here?'; | ||
|
||
// Fixme [short-mention] these should now be short-mention candidates | ||
const resultString = | ||
'<mention-here>@here</mention-here>' + | ||
' <em><mention-here>@here</mention-here></em>' + | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters