mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-09-03 19:52:37 +02:00
tests for lazy loading
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user