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

Commit

Permalink
Merge 7f22867 into 6688a2e
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Feb 27, 2020
2 parents 6688a2e + 7f22867 commit 8efe452
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/image/imageloadobserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,22 @@ describe( 'ImageLoadObserver', () => {
sinon.assert.notCalled( spy );
} );

it( 'should not fire `loadImage` event for non-image elements', () => {
const spy = sinon.spy();

viewDocument.on( 'imageLoaded', spy );

setData( view, '<p>foo</p>' );

sinon.assert.notCalled( spy );

const img = domRoot.querySelector( 'p' );

img.dispatchEvent( new Event( 'load' ) );

sinon.assert.notCalled( spy );
} );

it( 'should do nothing with an image when changes are in the other parent', () => {
setData(
view,
Expand Down

0 comments on commit 8efe452

Please sign in to comment.