aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/util.js
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2018-10-29 21:11:50 +0100
committerXhmikosR <[email protected]>2018-10-30 08:57:02 +0200
commit5aed968750177ec35f99dc03e71eec3632beb844 (patch)
treee4a3c6c0dab1dfe588b7ed6e779d4b9754ed804e /js/tests/unit/util.js
parent5e6b53a7c012be9bcef5b2c5edc7b3cdafc102a7 (diff)
downloadbootstrap-5aed968750177ec35f99dc03e71eec3632beb844.tar.xz
bootstrap-5aed968750177ec35f99dc03e71eec3632beb844.zip
Prevent the background to be shown when transitioning
Diffstat (limited to 'js/tests/unit/util.js')
-rw-r--r--js/tests/unit/util.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/tests/unit/util.js b/js/tests/unit/util.js
index 768afc8fe..abe153a22 100644
--- a/js/tests/unit/util.js
+++ b/js/tests/unit/util.js
@@ -75,6 +75,16 @@ $(function () {
assert.strictEqual(Util.getTransitionDurationFromElement($div[0]), 400)
})
+ QUnit.test('Util.getTransitionDurationFromElement should return the addition of transition-delay and transition-duration', function (assert) {
+ assert.expect(2)
+ var $fixture = $('#qunit-fixture')
+ var $div = $('<div style="transition: all 0s 2ms ease-out;"></div>').appendTo($fixture)
+ var $div2 = $('<div style="transition: all .25s 30ms ease-out;"></div>').appendTo($fixture)
+
+ assert.strictEqual(Util.getTransitionDurationFromElement($div[0]), 2)
+ assert.strictEqual(Util.getTransitionDurationFromElement($div2[0]), 280)
+ })
+
QUnit.test('Util.getTransitionDurationFromElement should get the first transition duration if multiple transition durations are defined', function (assert) {
assert.expect(1)
var $div = $('<div style="transition: transform .3s ease-out, opacity .2s;"></div>').appendTo($('#qunit-fixture'))