aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/desandro/imagesloaded/test/unit/jquery-fail.js
diff options
context:
space:
mode:
authorManuel Jiménez Friaza <mjfriaza@openmailbox.org>2018-12-05 12:32:33 +0100
committerManuel Jiménez Friaza <mjfriaza@openmailbox.org>2018-12-05 12:32:33 +0100
commit4cd5529027efa19288ddce125f0d41ccb5519578 (patch)
tree69b5bb1b43d807908d38d7febec21732fd334a49 /vendor/desandro/imagesloaded/test/unit/jquery-fail.js
parent5ac08ec3aa8ede14141390670a8097a60769e11e (diff)
parentd12744011affe7f6b79201442ad9fce6e083bdbb (diff)
downloadvolse-hubzilla-4cd5529027efa19288ddce125f0d41ccb5519578.tar.gz
volse-hubzilla-4cd5529027efa19288ddce125f0d41ccb5519578.tar.bz2
volse-hubzilla-4cd5529027efa19288ddce125f0d41ccb5519578.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'vendor/desandro/imagesloaded/test/unit/jquery-fail.js')
-rw-r--r--vendor/desandro/imagesloaded/test/unit/jquery-fail.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/desandro/imagesloaded/test/unit/jquery-fail.js b/vendor/desandro/imagesloaded/test/unit/jquery-fail.js
new file mode 100644
index 000000000..b2180f6f2
--- /dev/null
+++ b/vendor/desandro/imagesloaded/test/unit/jquery-fail.js
@@ -0,0 +1,29 @@
+QUnit.test( 'jquery fail', function( assert ) {
+
+ 'use strict';
+
+ var $ = window.jQuery;
+ var $images = $('#jquery-fail img');
+ var done = assert.async( 3 + $images.length );
+
+ $('#jquery-fail').imagesLoaded( function( instance ) {
+ assert.ok( true, 'callback triggered' );
+ assert.ok( instance instanceof imagesLoaded, 'instance instanceof imagesLoaded' );
+ done();
+ })
+ .fail( function( instance ) {
+ assert.ok( true, 'fail triggered' );
+ assert.ok( instance instanceof imagesLoaded, 'instance instanceof imagesLoaded' );
+ done();
+ })
+ .always( function( instance ) {
+ assert.ok( true, 'always triggered' );
+ assert.ok( instance instanceof imagesLoaded, 'instance instanceof imagesLoaded' );
+ done();
+ })
+ .progress( function(/* instance, image */) {
+ assert.ok( true, 'progress trigged');
+ done();
+ });
+
+ });