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

Commit

Permalink
Tests: Fixed to.be.equal() use.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Apr 24, 2020
1 parent 88300ff commit 4fc993e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/imageresize.js
Expand Up @@ -229,7 +229,7 @@ describe( 'ImageResize', () => {

resizerMouseSimulator.move( editor, domParts.resizeHandle, null, initialPointerPosition );

expect( resizeWrapperView.getStyle( 'width' ) ).to.be.equal( '100px' );
expect( resizeWrapperView.getStyle( 'width' ) ).to.equal( '100px' );

resizerMouseSimulator.up( editor );
} );
Expand Down Expand Up @@ -271,7 +271,7 @@ describe( 'ImageResize', () => {
to: finalPointerPosition
} );

expect( '120px' ).to.be.equal( domParts.widget.style.width );
expect( '120px' ).to.equal( domParts.widget.style.width );

editor.commands.get( 'undo' ).execute();

Expand All @@ -284,8 +284,8 @@ describe( 'ImageResize', () => {
const resizerWrapper = document.querySelector( '.ck-widget__resizer' );
const shadowBoundingRect = resizerWrapper.getBoundingClientRect();

expect( shadowBoundingRect.width ).to.be.equal( 100 );
expect( shadowBoundingRect.height ).to.be.equal( 50 );
expect( shadowBoundingRect.width ).to.equal( 100 );
expect( shadowBoundingRect.height ).to.equal( 50 );
} );
} );

Expand All @@ -311,7 +311,7 @@ describe( 'ImageResize', () => {
to: finalPointerPosition
} );

expect( model.getAttribute( 'width' ) ).to.be.equal( '60px' );
expect( model.getAttribute( 'width' ) ).to.equal( '60px' );
} );
} );

Expand Down Expand Up @@ -363,7 +363,7 @@ describe( 'ImageResize', () => {
to: finalPointerPosition
} );

expect( model.getAttribute( 'width' ) ).to.be.equal( '76px' );
expect( model.getAttribute( 'width' ) ).to.equal( '76px' );
} );

it( 'retains width after removing srcset', () => {
Expand All @@ -381,7 +381,7 @@ describe( 'ImageResize', () => {
} );

const expectedHtml = '<figure class="image image_resized" style="width:80px;"><img src="/assets/sample.png"></figure>';
expect( editor.getData() ).to.be.equal( expectedHtml );
expect( editor.getData() ).to.equal( expectedHtml );
} );

async function preloadImage( imageUrl ) {
Expand Down

0 comments on commit 4fc993e

Please sign in to comment.