mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
config redirect
This commit is contained in:
35
node_modules/outlayer/test/unit/destroy.js
generated
vendored
Normal file
35
node_modules/outlayer/test/unit/destroy.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
QUnit.test( 'destroy', function( assert ) {
|
||||
|
||||
var container = document.querySelector('#destroy');
|
||||
var layout = new CellsByRow( container );
|
||||
|
||||
layout.destroy();
|
||||
|
||||
assert.ok( !CellsByRow.data( container ), '.data() returns falsey' );
|
||||
|
||||
function checkStyle( elem, property ) {
|
||||
assert.ok( !elem.style[ property ], elem + ' has no ' + property + ' style' );
|
||||
}
|
||||
|
||||
checkStyle( container, 'height' );
|
||||
checkStyle( container, 'position' );
|
||||
|
||||
var items = container.querySelectorAll('.item');
|
||||
for ( var i=0, len = items.length; i < len; i++ ) {
|
||||
var itemElem = items[i];
|
||||
checkStyle( itemElem, 'position' );
|
||||
checkStyle( itemElem, 'left' );
|
||||
checkStyle( itemElem, 'top' );
|
||||
}
|
||||
|
||||
// try to force a resize
|
||||
container.style.width = '300px';
|
||||
layout.resize();
|
||||
|
||||
checkStyle( container, 'height' );
|
||||
checkStyle( container, 'position' );
|
||||
checkStyle( items[0], 'position' );
|
||||
checkStyle( items[0], 'left' );
|
||||
checkStyle( items[0], 'top' );
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user