@@ -46,44 +46,35 @@ $(function () {
46
46
assert . expect ( 1 )
47
47
var $div = $ ( '<div style="transition: all 300ms ease-out;"></div>' ) . appendTo ( $ ( '#qunit-fixture' ) )
48
48
49
- assert . strictEqual ( Util . getTransitionDurationFromElement ( $div ) , 300 )
49
+ assert . strictEqual ( Util . getTransitionDurationFromElement ( $div [ 0 ] ) , 300 )
50
50
} )
51
51
52
52
QUnit . test ( 'Util.getTransitionDurationFromElement should accept transition durations in seconds' , function ( assert ) {
53
53
assert . expect ( 1 )
54
54
var $div = $ ( '<div style="transition: all .4s ease-out;"></div>' ) . appendTo ( $ ( '#qunit-fixture' ) )
55
55
56
- assert . strictEqual ( Util . getTransitionDurationFromElement ( $div ) , 400 )
56
+ assert . strictEqual ( Util . getTransitionDurationFromElement ( $div [ 0 ] ) , 400 )
57
57
} )
58
58
59
59
QUnit . test ( 'Util.getTransitionDurationFromElement should get the first transition duration if multiple transition durations are defined' , function ( assert ) {
60
60
assert . expect ( 1 )
61
61
var $div = $ ( '<div style="transition: transform .3s ease-out, opacity .2s;"></div>' ) . appendTo ( $ ( '#qunit-fixture' ) )
62
62
63
- assert . strictEqual ( Util . getTransitionDurationFromElement ( $div ) , 300 )
63
+ assert . strictEqual ( Util . getTransitionDurationFromElement ( $div [ 0 ] ) , 300 )
64
64
} )
65
65
66
66
QUnit . test ( 'Util.getTransitionDurationFromElement should return 0 if transition duration is not defined' , function ( assert ) {
67
67
assert . expect ( 1 )
68
68
var $div = $ ( '<div></div>' ) . appendTo ( $ ( '#qunit-fixture' ) )
69
69
70
- assert . strictEqual ( Util . getTransitionDurationFromElement ( $div ) , 0 )
70
+ assert . strictEqual ( Util . getTransitionDurationFromElement ( $div [ 0 ] ) , 0 )
71
71
} )
72
72
73
73
QUnit . test ( 'Util.getTransitionDurationFromElement should return 0 if element is not found in DOM' , function ( assert ) {
74
74
assert . expect ( 1 )
75
75
var $div = $ ( '#fake-id' )
76
76
77
- assert . strictEqual ( Util . getTransitionDurationFromElement ( $div ) , 0 )
78
- } )
79
-
80
- QUnit . test ( 'Util.getTransitionDurationFromElement should properly handle inherited transition durations' , function ( assert ) {
81
- assert . expect ( 1 )
82
- var $parent = $ ( '<div style="transition-duration: 5s;"></div>' )
83
- var $child = $ ( '<div style="transition-duration: inherit;"></div>' )
84
- $ ( '#qunit-fixture' ) . append ( $parent . append ( $child ) )
85
-
86
- assert . strictEqual ( Util . getTransitionDurationFromElement ( $child ) , 5000 )
77
+ assert . strictEqual ( Util . getTransitionDurationFromElement ( $div [ 0 ] ) , 0 )
87
78
} )
88
79
89
80
QUnit . test ( 'Util.getUID should generate a new id uniq' , function ( assert ) {
0 commit comments