fix test in #310
This commit is contained in:
		
							parent
							
								
									0ea0a35521
								
							
						
					
					
						commit
						89b4320a8e
					
				@ -151,11 +151,10 @@ export const testInsertafter = tc => {
 | 
				
			|||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @param {t.TestCase} tc
 | 
					 * @param {t.TestCase} tc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 export const testClone = tc => {
 | 
					export const testClone = tc => {
 | 
				
			||||||
  const ydoc = new Y.Doc()
 | 
					  const ydoc = new Y.Doc()
 | 
				
			||||||
  const yxml = ydoc.getXmlFragment()
 | 
					  const yxml = ydoc.getXmlFragment()
 | 
				
			||||||
  const first = new Y.XmlText('text')
 | 
					  const first = new Y.XmlText('text')
 | 
				
			||||||
@ -165,6 +164,7 @@ export const testInsertafter = tc => {
 | 
				
			|||||||
  t.compareArrays(yxml.toArray(), [first, second, third])
 | 
					  t.compareArrays(yxml.toArray(), [first, second, third])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const cloneYxml = yxml.clone()
 | 
					  const cloneYxml = yxml.clone()
 | 
				
			||||||
 | 
					  ydoc.getArray('copyarr').insert(0, [cloneYxml])
 | 
				
			||||||
  t.assert(cloneYxml.length === 3)
 | 
					  t.assert(cloneYxml.length === 3)
 | 
				
			||||||
  t.assert(cloneYxml.toJSON() === yxml.toJSON())
 | 
					  t.compare(cloneYxml.toJSON(), yxml.toJSON())
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user