diff --git a/__tests__/ExpensiMark-HTML-test.js b/__tests__/ExpensiMark-HTML-test.js index 0051dd4c..df53ba14 100644 --- a/__tests__/ExpensiMark-HTML-test.js +++ b/__tests__/ExpensiMark-HTML-test.js @@ -26,6 +26,24 @@ test('Test bold within code blocks is skipped', () => { expect(parser.replace(testString)).toBe(replacedString); }); +test('Test special character plus _ ahead asterisk still result in bold', () => { + const testString = 'This is a !_*bold*'; + const replacedString = 'This is a !_bold'; + expect(parser.replace(testString)).toBe(replacedString); +}); + +test('Test a word plus _ ahead asterisk not result in bold', () => { + const testString = 'This is not a_*bold*'; + const replacedString = 'This is not a_*bold*'; + expect(parser.replace(testString)).toBe(replacedString); +}); + +test('Test _ ahead asterisk still result in bold', () => { + const testString = 'This is a ~_*bold*'; + const replacedString = 'This is a ~_bold'; + expect(parser.replace(testString)).toBe(replacedString); +}); + test('Test heading markdown replacement', () => { let testString = '# Heading should not have new line after it.\n'; expect(parser.replace(testString)).toBe('