mirror of
https://github.com/videojs/video.js.git
synced 2024-11-30 09:06:49 +02:00
test: fix IE9 rounding issue with lastvolume test (#4230)
#4227 caused an error in IE9 because it returns back a bad float number. Instead, we toFixed(1) the response
This commit is contained in:
parent
16c1e0adc0
commit
46dd0aac11
@ -158,7 +158,8 @@ if (Html5.isSupported()) {
|
||||
|
||||
muteToggle.handleClick();
|
||||
|
||||
assert.equal(player.volume(), 0.1, 'since lastVolume is less than 0.1, volume is set to 0.1');
|
||||
// `Number.prototype.toFixed()` is used here to circumvent IE9 rounding issues
|
||||
assert.equal(player.volume().toFixed(1), (0.1).toFixed(1), 'since lastVolume is less than 0.1, volume is set to 0.1');
|
||||
assert.equal(player.muted(), false, 'muted is set to false');
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user