diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-04-27 14:46:49 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-04-27 14:47:02 +0200 |
commit | eea437f4be92bafbe96d5276233d4fdff7b5f814 (patch) | |
tree | 95c3d337dd640b160a252c1dc044e9ab0a774078 /test | |
parent | 1623b3782efe7b57846ad7fb66fc50d1c8f041ea (diff) | |
download | perl-software-in-gnu-guix-eea437f4be92bafbe96d5276233d4fdff7b5f814.tar perl-software-in-gnu-guix-eea437f4be92bafbe96d5276233d4fdff7b5f814.tar.gz |
new api method: getBackgroundSlide
Diffstat (limited to 'test')
-rw-r--r-- | test/test.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js index 93a3d61..30b5c75 100644 --- a/test/test.js +++ b/test/test.js @@ -109,6 +109,14 @@ Reveal.addEventListener( 'ready', function() { strictEqual( Reveal.getSlide( 100 ), undefined, 'returns undefined when slide can\'t be found' ); }); + test( 'Reveal.getSlideBackground', function() { + var firstBackground = document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ); + + equal( Reveal.getSlideBackground( 0 ), firstBackground, 'gets correct first background' ); + + strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'returns undefined when background can\'t be found' ); + }); + test( 'Reveal.getPreviousSlide/getCurrentSlide', function() { Reveal.slide( 0, 0 ); Reveal.slide( 1, 0 ); |