aboutsummaryrefslogtreecommitdiff
path: root/test/test.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-04-22 15:58:21 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-04-22 15:58:21 +0200
commit3ad0d6adc026c620af1b2eaadabd2ce2c338e2f1 (patch)
tree114212aa5f86beb776f960225a27692014de894a /test/test.js
parentbbd596e434969b446c2dff0929e3117285974fc4 (diff)
downloadfosdem-2018-presentation-3ad0d6adc026c620af1b2eaadabd2ce2c338e2f1.tar
fosdem-2018-presentation-3ad0d6adc026c620af1b2eaadabd2ce2c338e2f1.tar.gz
tests for lazy loading
Diffstat (limited to 'test/test.js')
-rw-r--r--test/test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js
index 90a002a..367373e 100644
--- a/test/test.js
+++ b/test/test.js
@@ -450,6 +450,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
QUnit.module( 'Events' );