Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: Fixed some tests that were broken after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Jan 10, 2018
1 parent 4c05e12 commit 2f51f45
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/model/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ describe( 'Writer', () => {
new Element( 'p', null, 'bar' )
] );

writer.merge( new Position( docFrag, [ 1 ] ) );
merge( new Position( docFrag, [ 1 ] ) );

expect( docFrag.getChild( 0 ).name ).to.equal( 'p' );
expect( docFrag.getChild( 0 ).getChild( 0 ).data ).to.equal( 'foobar' );
Expand Down Expand Up @@ -1683,7 +1683,7 @@ describe( 'Writer', () => {

docFrag.appendChildren( p );

writer.rename( p, 'h' );
rename( p, 'h' );

expect( docFrag.maxOffset ).to.equal( 1 );
expect( docFrag.getChild( 0 ) ).to.have.property( 'name', 'h' );
Expand Down Expand Up @@ -1738,7 +1738,7 @@ describe( 'Writer', () => {
const docFrag = new DocumentFragment();
docFrag.appendChildren( new Element( 'p', null, new Text( 'foobar' ) ) );

writer.split( new Position( docFrag, [ 0, 3 ] ) );
split( new Position( docFrag, [ 0, 3 ] ) );

expect( docFrag.maxOffset ).to.equal( 2 );

Expand Down Expand Up @@ -1834,7 +1834,7 @@ describe( 'Writer', () => {
it( 'should wrap inside document fragment', () => {
const docFrag = new DocumentFragment( new Text( 'foo' ) );

writer.wrap( Range.createIn( docFrag ), 'p' );
wrap( Range.createIn( docFrag ), 'p' );

expect( docFrag.maxOffset ).to.equal( 1 );
expect( docFrag.getChild( 0 ).name ).to.equal( 'p' );
Expand Down Expand Up @@ -1896,7 +1896,7 @@ describe( 'Writer', () => {
it( 'should unwrap inside document fragment', () => {
const docFrag = new DocumentFragment( new Element( 'p', null, new Text( 'foo' ) ) );

writer.unwrap( docFrag.getChild( 0 ) );
unwrap( docFrag.getChild( 0 ) );

expect( docFrag.maxOffset ).to.equal( 3 );
expect( docFrag.getChild( 0 ).data ).to.equal( 'foo' );
Expand Down

0 comments on commit 2f51f45

Please sign in to comment.