aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/checkboxradio
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-07-22 16:04:47 +0200
committerGitHub <noreply@github.com>2020-07-22 16:04:47 +0200
commitb61b16b5a89ee27b30efdf7635d897af810af130 (patch)
treed2fc081ab5465ac1cd8e12072e92e9245dda8b08 /tests/unit/checkboxradio
parent086c304218b0f6e24e8f9ea7d76c75d192977abd (diff)
downloadjquery-ui-b61b16b5a89ee27b30efdf7635d897af810af130.tar.gz
jquery-ui-b61b16b5a89ee27b30efdf7635d897af810af130.zip
All: Drop support for jQuery 1.7
Closes gh-1923
Diffstat (limited to 'tests/unit/checkboxradio')
-rw-r--r--tests/unit/checkboxradio/core.js26
1 files changed, 10 insertions, 16 deletions
diff --git a/tests/unit/checkboxradio/core.js b/tests/unit/checkboxradio/core.js
index e1211773d..b16c09408 100644
--- a/tests/unit/checkboxradio/core.js
+++ b/tests/unit/checkboxradio/core.js
@@ -94,28 +94,25 @@ QUnit.test( "Checkbox creation requires a label, and finds it in all cases", fun
QUnit.test( "Calling checkboxradio on an unsupported element throws an error", function( assert ) {
assert.expect( 2 );
- var errorMessage =
- "Can't create checkboxradio on element.nodeName=div and element.type=undefined";
- var error = new Error( errorMessage );
+ var error = new Error(
+ "Can't create checkboxradio on element.nodeName=div and element.type=undefined"
+ );
assert.raises(
function() {
$( "<div>" ).checkboxradio();
},
-
- // Support: jQuery 1.7.0 only
- $.fn.jquery === "1.7" ? errorMessage : error,
+ error,
"Proper error thrown"
);
- errorMessage = "Can't create checkboxradio on element.nodeName=input and element.type=button";
- error = new Error( errorMessage );
+ error = new Error(
+ "Can't create checkboxradio on element.nodeName=input and element.type=button"
+ );
assert.raises(
function() {
$( "<input type='button'>" ).checkboxradio();
},
-
- // Support: jQuery 1.7.0 only
- $.fn.jquery === "1.7" ? errorMessage : error,
+ error,
"Proper error thrown"
);
} );
@@ -123,15 +120,12 @@ QUnit.test( "Calling checkboxradio on an unsupported element throws an error", f
QUnit.test( "Calling checkboxradio on an input with no label throws an error", function( assert ) {
assert.expect( 1 );
- var errorMessage = "No label found for checkboxradio widget";
- var error = new Error( errorMessage );
+ var error = new Error( "No label found for checkboxradio widget" );
assert.raises(
function() {
$( "<input type='checkbox'>" ).checkboxradio();
},
-
- // Support: jQuery 1.7.0 only
- $.fn.jquery === "1.7" ? errorMessage : error,
+ error,
"Proper error thrown"
);
} );