aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJ.Son <x@x-wx.com>2024-03-01 07:40:41 +0800
committerGitHub <noreply@github.com>2024-03-01 00:40:41 +0100
commit2b97b6bbcfc67c234b86d41451aac7cdd778e855 (patch)
treee5601e64d45a0bc1e75657b2b95dcb55a156dc32 /test
parentc21c6f4ddf96a5928e03bdd2bf0da87899f2ec24 (diff)
downloadjquery-2b97b6bbcfc67c234b86d41451aac7cdd778e855.tar.gz
jquery-2b97b6bbcfc67c234b86d41451aac7cdd778e855.zip
Tests: Use allowlist instead of whitelist
Closes gh-5420
Diffstat (limited to 'test')
-rw-r--r--test/unit/css.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index 5567b7437..ea3055f77 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -1278,10 +1278,10 @@ QUnit.test( "Do not append px to most properties not accepting integer values",
assert.equal( $div.css( "letter-spacing" ), "2px", "Do not append px to 'letter-spacing'" );
} );
-QUnit.test( "Append px to whitelisted properties", function( assert ) {
+QUnit.test( "Append px to allowlisted properties", function( assert ) {
var prop,
$div = jQuery( "<div>" ).appendTo( "#qunit-fixture" ),
- whitelist = {
+ allowlist = {
margin: "marginTop",
marginTop: undefined,
marginRight: undefined,
@@ -1314,10 +1314,10 @@ QUnit.test( "Append px to whitelisted properties", function( assert ) {
borderLeftWidth: undefined
};
- assert.expect( ( Object.keys( whitelist ).length ) * 2 );
+ assert.expect( ( Object.keys( allowlist ).length ) * 2 );
- for ( prop in whitelist ) {
- var propToCheck = whitelist[ prop ] || prop,
+ for ( prop in allowlist ) {
+ var propToCheck = allowlist[ prop ] || prop,
kebabProp = prop.replace( /[A-Z]/g, function( match ) {
return "-" + match.toLowerCase();
} ),