@@ -51,7 +51,7 @@ describe('Deck JS', function() {
5151 $ . deck ( 'go' , 5 ) ;
5252 expect ( $ . deck ( 'getSlide' ) ) . toHaveClass ( 'slide1' ) ;
5353 } ) ;
54-
54+
5555 it ( 'should go nowhere if id does not exist' , function ( ) {
5656 $ . deck ( 'go' , 'i-dont-exist' ) ;
5757 expect ( $ . deck ( 'getSlide' ) ) . toHaveClass ( 'slide1' ) ;
@@ -123,13 +123,13 @@ describe('Deck JS', function() {
123123 expect ( slides ) . toEqual ( expectation ) ;
124124 } ) ;
125125 } ) ;
126-
126+
127127 describe ( 'getContainer()' , function ( ) {
128128 it ( 'should return a jQuery object with the container element(s)' , function ( ) {
129129 expect ( $ . deck ( 'getContainer' ) ) . toBe ( defaults . selectors . container ) ;
130130 } ) ;
131131 } ) ;
132-
132+
133133 describe ( 'getOptions()' , function ( ) {
134134 it ( 'should return the current options object' , function ( ) {
135135 expect ( $ . deck ( 'getOptions' ) ) . toEqual ( defaults ) ;
@@ -229,7 +229,7 @@ describe('Deck JS', function() {
229229 $d . trigger ( e ) ;
230230 expect ( $ . deck ( 'getSlide' ) ) . toHaveClass ( 'alt-slide1' ) ;
231231 } ) ;
232-
232+
233233 it ( 'should not trigger events that originate within editable elements' , function ( ) {
234234 var $outside = $ ( '<input type="text" />' ) . appendTo ( 'body' ) ;
235235 e = jQuery . Event ( 'keydown' ) ;
@@ -273,54 +273,54 @@ describe('Deck JS', function() {
273273 expect ( from ) . toEqual ( 1 ) ;
274274 expect ( to ) . toEqual ( 3 ) ;
275275 } ;
276-
276+
277277 $d . bind ( 'deck.change' , f ) ;
278278 $ . deck ( 'go' , 3 ) ;
279279 $d . unbind ( 'deck.change' , f ) ;
280280 } ) ;
281-
281+
282282 it ( 'should not change slides if default prevented' , function ( ) {
283283 $d . bind ( 'deck.change' , false ) ;
284284 $ . deck ( 'go' , 3 ) ;
285285 expect ( $ . deck ( 'getSlide' ) ) . toEqual ( $ . deck ( 'getSlide' , 1 ) ) ;
286286 $d . unbind ( 'deck.change' , false ) ;
287287 } ) ;
288288 } ) ;
289-
289+
290290 describe ( 'deck.init' , function ( ) {
291291 it ( 'should fire on deck initialization' , function ( ) {
292292 expect ( 'deck.init' ) . toHaveBeenTriggeredOn ( $d ) ;
293293 } ) ;
294-
294+
295295 it ( 'should have already populated the slides array' , function ( ) {
296296 var f = function ( ) {
297297 expect ( $ . deck ( 'getSlides' ) . length ) . toBeGreaterThan ( 0 ) ;
298298 } ;
299-
299+
300300 $d . bind ( 'deck.init' , f ) ;
301301 $ . deck ( '.slide' ) ;
302302 $d . unbind ( 'deck.init' , f ) ;
303303 } ) ;
304304 } ) ;
305-
305+
306306 describe ( 'deck.beforeInit' , function ( ) {
307307 it ( 'should fire on deck initialization' , function ( ) {
308308 expect ( 'deck.beforeInit' ) . toHaveBeenTriggeredOn ( $d ) ;
309309 } ) ;
310-
310+
311311 it ( 'should have not populated the slides array' , function ( ) {
312312 var f = function ( ) {
313313 expect ( $ . deck ( 'getSlides' ) . length ) . toEqual ( 0 ) ;
314314 } ;
315-
315+
316316 $d . bind ( 'deck.beforeInit' , f ) ;
317317 $ . deck ( '.slide' ) ;
318318 $d . unbind ( 'deck.beforeInit' , f ) ;
319319 } ) ;
320320 } ) ;
321321 } ) ;
322322 } ) ;
323-
323+
324324 describe ( 'complex html structure' , function ( ) {
325325 beforeEach ( function ( ) {
326326 loadFixtures ( 'complex.html' ) ;
@@ -341,43 +341,43 @@ describe('Deck JS', function() {
341341 ] ) ;
342342 $ . deck ( 'go' , 2 ) ;
343343 } ) ;
344-
344+
345345 describe ( 'compound state classes' , function ( ) {
346346 it ( 'should apply current class' , function ( ) {
347347 $ ( '.slide3' ) . each ( function ( i , el ) {
348348 expect ( $ ( el ) ) . toHaveClass ( defaults . classes . current ) ;
349349 } ) ;
350350 } ) ;
351-
351+
352352 it ( 'should apply previous class' , function ( ) {
353353 $ ( '.slide2' ) . each ( function ( i , el ) {
354354 expect ( $ ( el ) ) . toHaveClass ( defaults . classes . previous ) ;
355355 } ) ;
356356 } ) ;
357-
357+
358358 it ( 'should apply next class' , function ( ) {
359359 $ ( '.slide4' ) . each ( function ( i , el ) {
360360 expect ( $ ( el ) ) . toHaveClass ( defaults . classes . next ) ;
361361 } ) ;
362362 } ) ;
363-
363+
364364 it ( 'should apply before class' , function ( ) {
365365 $ ( '.slide1' ) . each ( function ( i , el ) {
366366 expect ( $ ( el ) ) . toHaveClass ( defaults . classes . before ) ;
367367 } ) ;
368368 } ) ;
369-
369+
370370 it ( 'should apply after class' , function ( ) {
371371 $ ( '.slide5, .slide6, .slide7, .slide8, .slide9, .slide10' ) . each ( function ( i , el ) {
372372 expect ( $ ( el ) ) . toHaveClass ( defaults . classes . after ) ;
373373 } ) ;
374374 } ) ;
375-
375+
376376 it ( 'should apply child-current class' , function ( ) {
377377 expect ( $ ( '.slide2' ) . not ( '.slide10' ) ) . toHaveClass ( defaults . classes . childCurrent ) ;
378378 } ) ;
379379 } ) ;
380-
380+
381381 it ( 'should remove old state classes' , function ( ) {
382382 $ . deck ( 'go' , 4 ) ;
383383 expect ( $ ( '.slide3' ) . not ( '.slide5' ) ) . not . toHaveClass ( defaults . classes . current ) ;
@@ -386,49 +386,12 @@ describe('Deck JS', function() {
386386 } ) ;
387387 } ) ;
388388
389- describe ( 'iframes' , function ( ) {
390- beforeEach ( function ( ) {
391- loadFixtures ( 'iframes.html' ) ;
392- if ( Modernizr . history ) {
393- history . replaceState ( { } , "" , "#" )
394- }
395- $ . deck ( [
396- '.slide1' ,
397- '.slide2' ,
398- '.slide3' ,
399- '.slide4' ,
400- '.slide5' ,
401- '.slide6' ,
402- '.slide7' ,
403- '.slide8' ,
404- '.slide9' ,
405- '.slide10' ,
406- ] ) ;
407-
408- } ) ;
409-
410- it ( 'should remove/restore iframe sources when leaving/entering a slide' , function ( ) {
411- $ . deck ( 'go' , 4 ) ;
412- expect ( $ . deck ( 'getSlide' ) . find ( 'iframe' ) . attr ( 'src' ) ) . toEqual ( 'fixtures/iframe_simple.html' ) ;
413- $ . deck ( 'next' ) ;
414- expect ( $ ( '.slide5' ) . find ( 'iframe' ) . attr ( 'src' ) ) . toEqual ( '' ) ;
415- $ . deck ( 'prev' ) ;
416- expect ( $ ( '.slide5' ) . find ( 'iframe' ) . attr ( 'src' ) ) . toEqual ( 'fixtures/iframe_simple.html' ) ;
417- } ) ;
418-
419- it ( 'should not store blank iframe sources' , function ( ) {
420- $ . deck ( 'go' , 6 ) ;
421- $ . deck ( 'next' ) ;
422- expect ( $ . deck ( 'getSlide' ) . find ( 'iframe' ) . data ( 'src' ) ) . toBeUndefined ( ) ;
423- } ) ;
424- } ) ;
425-
426389 describe ( 'empty deck' , function ( ) {
427390 beforeEach ( function ( ) {
428391 loadFixtures ( 'empty.html' ) ;
429392 $ . deck ( '.slide' ) ;
430393 } ) ;
431-
394+
432395 describe ( 'getSlide()' , function ( ) {
433396 it ( 'should not error on init' , $ . noop ) ;
434397 } ) ;
0 commit comments