Skip to content
Snippets Groups Projects
Commit 3ad0d6ad authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

tests for lazy loading

parent bbd596e4
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,11 @@
<section>
<h1>1</h1>
<img data-src="fake-url.png">
<video>
<source data-src="fake-url.mp4" />
<source data-src="fake-url.webm" />
</video>
</section>
<section>
......
......@@ -449,6 +449,18 @@ Reveal.addEventListener( 'ready', function() {
});
// ---------------------------------------------------------------
// LAZY-LOADING TESTS
QUnit.module( 'Lazy-Loading' );
test( 'img with data-src', function() {
strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
strictEqual( document.querySelectorAll( '.reveal section video source[src]' ).length, 2, 'Video sources have been set' );
});
// ---------------------------------------------------------------
// EVENT TESTS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment