mirror of
https://github.com/desandro/imagesloaded.git
synced 2026-02-02 11:33:22 +01:00
13 lines
504 B
JavaScript
13 lines
504 B
JavaScript
QUnit.test( 'selector string', function( assert ) {
|
|
let images = document.querySelectorAll('#basics img');
|
|
let done = assert.async();
|
|
let imgLoad = imagesLoaded( '#basics', { debug: true } )
|
|
.on( 'done', function( obj ) {
|
|
assert.ok( true, 'selector string worked' );
|
|
assert.ok( obj.images, 'argument has images' );
|
|
assert.equal( obj.images.length, images.length, 'images.length matches' );
|
|
done();
|
|
} );
|
|
assert.ok( imgLoad.options.debug, 'debug option set' );
|
|
} );
|