@@ -96,6 +96,34 @@ describe('endToEnd', () => {
9696 const element = write ( await read ( text ) , { speaker : true } ) ;
9797 expect ( element ) . toStrictEqual ( [ { speaker : 'human' , content : [ ] } ] ) ;
9898 } ) ;
99+
100+ test ( 'inlineSerializeEndToEnd' , async ( ) => {
101+ const text =
102+ '<Markup.Environment><Serialize.Environment inline="true"><Serialize.Any name="hello">world</Serialize.Any></Serialize.Environment></Markup.Environment>' ;
103+ const result = await poml ( text ) ;
104+ expect ( result ) . toBe ( '`{\n "hello": "world"\n}`' ) ;
105+ } ) ;
106+
107+ test ( 'blockSerializeEndToEnd' , async ( ) => {
108+ const text =
109+ '<Markup.Environment><Serialize.Environment><Serialize.Any name="hello">world</Serialize.Any></Serialize.Environment></Markup.Environment>' ;
110+ const result = await poml ( text ) ;
111+ expect ( result ) . toBe ( '```json\n{\n "hello": "world"\n}\n```' ) ;
112+ } ) ;
113+
114+ test ( 'inlineFreeEndToEnd' , async ( ) => {
115+ const text =
116+ '<Markup.Environment><Free.Environment inline="true">hello world</Free.Environment></Markup.Environment>' ;
117+ const result = await poml ( text ) ;
118+ expect ( result ) . toBe ( '`hello world`' ) ;
119+ } ) ;
120+
121+ test ( 'blockFreeEndToEnd' , async ( ) => {
122+ const text =
123+ '<Markup.Environment><Free.Environment>hello world</Free.Environment></Markup.Environment>' ;
124+ const result = await poml ( text ) ;
125+ expect ( result ) . toBe ( '```\nhello world\n```' ) ;
126+ } ) ;
99127} ) ;
100128
101129describe ( 'diagnosis' , ( ) => {
0 commit comments