'use strict'; /*! * VisualEditor Cite-specific DiffElement tests. * * @copyright 2011-2018 VisualEditor Team and others; see http://ve.mit-license.org */ QUnit.module( 've.ui.DiffElement (Cite)' ); QUnit.test( 'Diffing', ( assert ) => { const spacer = '
${ ref( 'Foo' ) }${ ref( 'Bar' ) }${ ref( 'Baz' ) }
${ ref( 'Foo' ) }${ ref( 'Bar ish' ) }${ ref( 'Baz' ) }
Foo
Baz
A ${ ref( 'Foo' ) }
B ${ ref( 'Bar' ) }
C ${ ref( 'Baz' ) }
`, newDoc: ve.dm.example.singleLine`A ${ ref( 'Foo' ) }
C ${ ref( 'Baz' ) }
`, expected: ve.dm.example.singleLine`A ${ ref( 'Foo', 1 ) }
B ${ ref( 'Bar', 2 ) }
C ${ ref( 'Baz', 2 ) }
Foo
Bar
Baz