mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 23:15:46 -06:00
24 lines
908 B
JavaScript
24 lines
908 B
JavaScript
QUnit.test( 'container size', function( assert ) {
|
|
var container = document.querySelector('#container-size');
|
|
var pckry = new Packery( container );
|
|
assert.equal( container.style.height, '40px', 'default height' );
|
|
|
|
pckry.options.gutter = 4;
|
|
pckry._getMeasurements();
|
|
pckry.layout();
|
|
assert.equal( container.style.height, '40px', 'added gutter, height same' );
|
|
|
|
// addPaddingBorders() {
|
|
container.style.padding = '1px 2px 3px 4px';
|
|
container.style.borderStyle = 'solid';
|
|
container.style.borderWidth = '1px 2px 3px 4px';
|
|
pckry.layout();
|
|
assert.equal( container.style.height, '40px', 'add padding, height same' );
|
|
|
|
// border box
|
|
container.style.WebkitBoxSizing = 'border-box';
|
|
container.style.MozBoxSizing = 'border-box';
|
|
container.style.boxSizing = 'border-box';
|
|
pckry.layout();
|
|
assert.equal( container.style.height, '48px', 'border-box, height + padding + border' );
|
|
});
|