@@ -207,24 +207,32 @@ const testSuite = (getKit: () => Kit) => {
207207 test ( 'can update the correct tag data' , ( ) => {
208208 const kit = setup ( ) ;
209209 kit . et . cursor ( { at : [ 8 ] } ) ;
210- kit . et . marker ( { action : 'ins' , type : [ [ 'ul' , 0 , { type : 'tasks' } ] , [ 'li' , 0 , { done : false } ] ] } ) ;
211- expect ( kit . toHtml ( ) ) . toBe ( '<p>abcdefgh</p><ul data-attr=\'{"type":"tasks"}\'><li data-attr=\'{"done":false}\'>ijklmnopqrstuvwxyz</li></ul>' ) ;
210+ kit . et . marker ( {
211+ action : 'ins' ,
212+ type : [
213+ [ 'ul' , 0 , { type : 'tasks' } ] ,
214+ [ 'li' , 0 , { done : false } ] ,
215+ ] ,
216+ } ) ;
217+ expect ( kit . toHtml ( ) ) . toBe (
218+ '<p>abcdefgh</p><ul data-attr=\'{"type":"tasks"}\'><li data-attr=\'{"done":false}\'>ijklmnopqrstuvwxyz</li></ul>' ,
219+ ) ;
212220 kit . et . marker ( {
213221 action : 'upd' ,
214222 target : [ 'data' , 0 ] ,
215- ops : [
216- [ 'add' , '/type' , 'ordered' ] ,
217- ] ,
223+ ops : [ [ 'add' , '/type' , 'ordered' ] ] ,
218224 } ) ;
219- expect ( kit . toHtml ( ) ) . toBe ( '<p>abcdefgh</p><ul data-attr=\'{"type":"ordered"}\'><li data-attr=\'{"done":false}\'>ijklmnopqrstuvwxyz</li></ul>' ) ;
225+ expect ( kit . toHtml ( ) ) . toBe (
226+ '<p>abcdefgh</p><ul data-attr=\'{"type":"ordered"}\'><li data-attr=\'{"done":false}\'>ijklmnopqrstuvwxyz</li></ul>' ,
227+ ) ;
220228 kit . et . marker ( {
221229 action : 'upd' ,
222230 target : [ 'data' , 1 ] ,
223- ops : [
224- [ 'replace' , '/done' , true ] ,
225- ] ,
231+ ops : [ [ 'replace' , '/done' , true ] ] ,
226232 } ) ;
227- expect ( kit . toHtml ( ) ) . toBe ( '<p>abcdefgh</p><ul data-attr=\'{"type":"ordered"}\'><li data-attr=\'{"done":true}\'>ijklmnopqrstuvwxyz</li></ul>' ) ;
233+ expect ( kit . toHtml ( ) ) . toBe (
234+ '<p>abcdefgh</p><ul data-attr=\'{"type":"ordered"}\'><li data-attr=\'{"done":true}\'>ijklmnopqrstuvwxyz</li></ul>' ,
235+ ) ;
228236 } ) ;
229237 } ) ;
230238 } ) ;
0 commit comments