Skip to content

Commit fc34dbc

Browse files
committed
Tests: Clean up after the CSS Custom Properties support test
Ref bcec54e Ref 619bf98
1 parent bcec54e commit fc34dbc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/unit/css.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,10 +1558,12 @@ QUnit.test( "Do not throw on frame elements from css method (#15098)", function(
15581558

15591559
( function() {
15601560
var supportsCssVars,
1561-
div = jQuery( "<div>" ).appendTo( "#qunit-fixture" )[ 0 ];
1561+
elem = jQuery( "<div>" ).appendTo( document.body ),
1562+
div = elem[ 0 ];
15621563

15631564
div.style.setProperty( "--prop", "value" );
1564-
supportsCssVars = getComputedStyle( div ).getPropertyValue( "--prop" );
1565+
supportsCssVars = !!getComputedStyle( div ).getPropertyValue( "--prop" );
1566+
elem.remove();
15651567

15661568
QUnit[ supportsCssVars ? "test" : "skip" ]( "css(--customProperty)", function( assert ) {
15671569
jQuery( "#qunit-fixture" ).append(

0 commit comments

Comments
 (0)