Skip to content

Commit

Permalink
move tests to already created one
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Nov 14, 2023
1 parent 7d8092d commit bc4bcab
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions __tests__/ExpensiMark-HTML-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ test('Test for here mention with invalid username', () => {
expect(parser.replace(testString)).toBe(resultString);
});

test('Test for @here mention with italic, bold and strikethrough styles', () => {
test('Test for @here mention with italic, bold and strikethrough styles', () => { // .!$%&+/=?^`{|}_-
const testString = '@here'
+ ' _@here_'
+ ' *@here*'
Expand All @@ -1270,7 +1270,10 @@ test('Test for @here mention with italic, bold and strikethrough styles', () =>
+ ' @here@'
+ ' @here$'
+ ' @here^'
+ ' @here(';
+ ' @here('
+ ' @here.'
+ ' @here!'
+ ' @here?';

const resultString = '<mention-here>@here</mention-here>'
+ ' <em><mention-here>@here</mention-here></em>'
Expand All @@ -1288,7 +1291,10 @@ test('Test for @here mention with italic, bold and strikethrough styles', () =>
+ ' <mention-here>@here</mention-here>@'
+ ' <mention-here>@here</mention-here>$'
+ ' <mention-here>@here</mention-here>^'
+ ' <mention-here>@here</mention-here>(';
+ ' <mention-here>@here</mention-here>('
+ ' <mention-here>@here</mention-here>.'
+ ' <mention-here>@here</mention-here>!'
+ ' <mention-here>@here</mention-here>?';
expect(parser.replace(testString)).toBe(resultString);
});

Expand Down Expand Up @@ -1418,17 +1424,6 @@ test('Test here mention with @here@here', () => {
expect(parser.replace(testString)).toBe(resultString);
});

test('Test here mention with @herex', () => {
const testString = '@herex';
expect(parser.replace(testString)).toBe(testString);
});

test('Test here mention with @here!', () => {
const testString = '@here!';
const resultString = '<mention-here>@here</mention-here>!';
expect(parser.replace(testString)).toBe(resultString);
});

test('Test link with code fence inside the alias text part', () => {
const testString = '[```code```](google.com) '
+ '[test ```code``` test](google.com)';
Expand Down

0 comments on commit bc4bcab

Please sign in to comment.