1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-04 06:48:49 +02:00

fix: allow rounded value for fluid player ratio test (#3739)

This commit is contained in:
mister-ben 2016-11-03 22:40:14 +00:00 committed by Gary Katsevman
parent 8f7eb121bb
commit 2e720afb65

View File

@ -323,8 +323,10 @@ QUnit.test('should set the width, height, and aspect ratio via a css class', fun
QUnit.test('should default to 16:9 when fluid', function(assert) {
const player = TestHelpers.makePlayer({fluid: true});
const ratio = player.currentHeight() / player.currentWidth();
assert.equal(player.currentHeight() / player.currentWidth(), 0.5625, 'fluid player without dimensions defaults to 16:9');
// IE8 rounds 0.5625 up to 0.563
assert.ok(((ratio >= 0.562) && (ratio <= 0.563)), 'fluid player without dimensions defaults to 16:9');
});
QUnit.test('should set fluid to true if element has vjs-fluid class', function(assert) {