aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/checkboxradio/events.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/checkboxradio/events.js')
-rw-r--r--tests/unit/checkboxradio/events.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/unit/checkboxradio/events.js b/tests/unit/checkboxradio/events.js
index 838e0ca63..9e391897f 100644
--- a/tests/unit/checkboxradio/events.js
+++ b/tests/unit/checkboxradio/events.js
@@ -1,14 +1,16 @@
define( [
+ "qunit",
"jquery",
"ui/widgets/checkboxradio"
-], function( $ ) {
+], function( QUnit, $ ) {
-module( "Checkboxradio: events" );
+QUnit.module( "Checkboxradio: events" );
-asyncTest(
+QUnit.test(
"Resetting a checkbox's form should refresh the visual state of the checkbox",
function( assert ) {
- expect( 2 );
+ var ready = assert.async();
+ assert.expect( 2 );
var form = $( "<form>" +
"<label for='c1'></label><input id='c1' type='checkbox' checked>" +
"</form>" ),
@@ -22,20 +24,21 @@ asyncTest(
setTimeout( function() {
assert.hasClasses( widget, "ui-state-active" );
- start();
+ ready();
}, 1 );
}
);
-asyncTest( "Checkbox shows focus when using keyboard navigation", function( assert ) {
- expect( 2 );
+QUnit.test( "Checkbox shows focus when using keyboard navigation", function( assert ) {
+ var ready = assert.async();
+ assert.expect( 2 );
var check = $( "#check" ).checkboxradio(),
label = $( "label[for='check']" );
assert.lacksClasses( label, "ui-state-focus" );
check.focus();
setTimeout( function() {
assert.hasClasses( label, "ui-state-focus" );
- start();
+ ready();
} );
} );