@@ -47,7 +47,7 @@ describe('conciergeDraftState', () => {
4747 expect ( draft ?. reportAction . actorAccountID ) . toBe ( CONST . ACCOUNT_ID . CONCIERGE ) ;
4848 expect ( draft ?. reportAction . created ) . toBe ( CREATED ) ;
4949 expect ( getFirstMessageHTML ( draft ) ) . toContain ( '<strong>world</strong>' ) ;
50- expect ( getFirstMessageText ( draft ) ) . toBe ( 'Hello, * world* !' ) ;
50+ expect ( getFirstMessageText ( draft ) ) . toBe ( 'Hello, world!' ) ;
5151 } ) ;
5252
5353 it ( 'should update the same draft session when a newer sequence arrives' , ( ) => {
@@ -79,7 +79,7 @@ describe('conciergeDraftState', () => {
7979 ) ;
8080
8181 expect ( staleDraft ) . toBe ( initialDraft ) ;
82- expect ( getFirstMessageText ( staleDraft ) ) . toBe ( 'Hello, * world* !' ) ;
82+ expect ( getFirstMessageText ( staleDraft ) ) . toBe ( 'Hello, world!' ) ;
8383 } ) ;
8484
8585 it ( 'should keep the draft visible through completion and prefer finalRenderedHTML when provided' , ( ) => {
@@ -138,10 +138,14 @@ describe('conciergeDraftState', () => {
138138 } ) ;
139139
140140 it ( 'does not alter complete markdown' , ( ) => {
141- const complete = 'Hello ** bold* * and [link](https://example.com) and `code`' ;
141+ const complete = 'Hello *bold* and [link](https://example.com) and `code`' ;
142142 expect ( stripIncompleteMarkdown ( complete ) ) . toBe ( complete ) ;
143143 } ) ;
144144
145+ it ( 'normalizes complete double-delimiter emphasis for ExpensiMark' , ( ) => {
146+ expect ( stripIncompleteMarkdown ( 'Hello **bold** and ~~strike~~' ) ) . toBe ( 'Hello *bold* and ~strike~' ) ;
147+ } ) ;
148+
145149 // --- Links / Images ---
146150 it ( 'strips an incomplete link with only opening bracket' , ( ) => {
147151 expect ( stripIncompleteMarkdown ( 'Check out [' ) ) . toBe ( 'Check out ' ) ;
@@ -182,7 +186,7 @@ describe('conciergeDraftState', () => {
182186 } ) ;
183187
184188 it ( 'preserves complete bold and strips only the unclosed one' , ( ) => {
185- expect ( stripIncompleteMarkdown ( '**done** and **broken' ) ) . toBe ( '** done* * and ' ) ;
189+ expect ( stripIncompleteMarkdown ( '**done** and **broken' ) ) . toBe ( '*done* and ' ) ;
186190 } ) ;
187191
188192 // --- Strikethrough (~~) ---
@@ -221,6 +225,13 @@ describe('conciergeDraftState', () => {
221225 } ) ;
222226
223227 // --- Streaming integration ---
228+ it ( 'keeps complete double-delimiter bold styled without showing raw delimiters during streaming' , ( ) => {
229+ const draft = applyConciergeDraftEvent ( null , createDraftEvent ( { bodyMarkdown : 'Hello **bold**!' } ) , REPORT_ID ) ;
230+
231+ expect ( getFirstMessageHTML ( draft ) ) . toContain ( '<strong>bold</strong>' ) ;
232+ expect ( getFirstMessageHTML ( draft ) ) . not . toContain ( '*' ) ;
233+ } ) ;
234+
224235 it ( 'strips incomplete markdown during a streaming draft event' , ( ) => {
225236 const draft = applyConciergeDraftEvent ( null , createDraftEvent ( { bodyMarkdown : 'Check [this link' } ) , REPORT_ID ) ;
226237 // The raw '[this link' syntax should NOT appear in the rendered HTML
0 commit comments