diff --git a/addon/components/responsive-image.hbs b/addon/components/responsive-image.hbs index 079089327..71c60a744 100644 --- a/addon/components/responsive-image.hbs +++ b/addon/components/responsive-image.hbs @@ -8,6 +8,7 @@ {{/each}} \ No newline at end of file diff --git a/tests/integration/components/responsive-image-test.js b/tests/integration/components/responsive-image-test.js index 2590e87b7..4f73bfd57 100644 --- a/tests/integration/components/responsive-image-test.js +++ b/tests/integration/components/responsive-image-test.js @@ -166,6 +166,18 @@ module('Integration: Responsive Image Component', function (hooks) { ); }); + test('it loads lazily by default', async function (assert) { + await render(hbs``); + assert.dom('img').hasAttribute('loading', 'lazy'); + }); + + test('it can optionally load eager', async function (assert) { + await render( + hbs`` + ); + assert.dom('img').hasAttribute('loading', 'eager'); + }); + test('it renders arbitrary HTML attributes', async function (assert) { await render( hbs``