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

Commit

Permalink
Merge 51b350a into 72c1524
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Jan 4, 2019
2 parents 72c1524 + 51b350a commit f5931a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/conversion/downcasthelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ describe( 'DowncastHelpers', () => {

// #1587
it( 'config.view and config.model as strings in generic conversion (elements only)', () => {
const logSpy = testUtils.sinon.spy( log, 'warn' );
const logStub = testUtils.sinon.stub( log, 'warn' );

downcastHelpers.elementToElement( { model: 'paragraph', view: 'p' } );

Expand All @@ -631,7 +631,7 @@ describe( 'DowncastHelpers', () => {
} );

expectResult( '<p test="1"></p><p test="2"></p>' );
expect( logSpy.callCount ).to.equal( 0 );
expect( logStub.callCount ).to.equal( 0 );

model.change( writer => {
writer.removeAttribute( 'test', modelRoot.getChild( 1 ) );
Expand All @@ -642,7 +642,7 @@ describe( 'DowncastHelpers', () => {

// #1587
it( 'config.view and config.model as strings in generic conversion (elements + text)', () => {
const logSpy = testUtils.sinon.spy( log, 'warn' );
const logStub = testUtils.sinon.stub( log, 'warn' );

downcastHelpers.elementToElement( { model: 'paragraph', view: 'p' } );

Expand All @@ -657,8 +657,8 @@ describe( 'DowncastHelpers', () => {
} );

expectResult( '<p>Foo</p><p test="1">Bar</p>' );
expect( logSpy.callCount ).to.equal( 2 );
expect( logSpy.alwaysCalledWithMatch( 'conversion-attribute-to-attribute-on-text' ) ).to.true;
expect( logStub.callCount ).to.equal( 2 );
expect( logStub.alwaysCalledWithMatch( 'conversion-attribute-to-attribute-on-text' ) ).to.true;

model.change( writer => {
writer.removeAttribute( 'test', modelRoot.getChild( 1 ) );
Expand Down

0 comments on commit f5931a0

Please sign in to comment.