Skip to content

Commit e4a31bd

Browse files
committed
Effects: Avoid expectWarning for async tests
1 parent fd324d2 commit e4a31bd

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

test/effects.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@ QUnit.test( "jQuery.easing", function( assert ) {
3131

3232
div.appendTo( "#qunit-fixture" );
3333

34-
expectWarning( assert, "easing", function() {
35-
div.animate( { width: 20 }, {
36-
duration: 100,
37-
easing: "test",
38-
complete: function() {
39-
assert.equal( lastP, 1 );
40-
animComplete();
41-
}
42-
} );
34+
// Can't use expectWarning since this is async
35+
jQuery.migrateReset();
36+
div.animate( { width: 20 }, {
37+
duration: 100,
38+
easing: "test",
39+
complete: function() {
40+
assert.equal( lastP, 1, "easing" );
41+
assert.equal( jQuery.migrateWarnings.length, 1, "warned" );
42+
animComplete();
43+
}
4344
} );
4445
} );
4546

0 commit comments

Comments
 (0)