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
Esse commit está contido em:
commit de
Gary Katsevman
pai
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');
|
||||
});
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário