Merge "includes/specials: Replace implicit Bugzilla bug numbers with Phab ones"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki.api / mediawiki.ForeignApi.test.js
index 9d0fdf5..69ab797 100644 (file)
@@ -3,16 +3,10 @@
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
                        this.server.respondImmediately = true;
-                       this.clock = this.sandbox.useFakeTimers();
-               },
-               teardown: function () {
-                       // https://github.com/jquery/jquery/issues/2453
-                       this.clock.tick();
                }
        } ) );
 
        QUnit.test( 'origin is included in GET requests', function ( assert ) {
-               QUnit.expect( 1 );
                var api = new mw.ForeignApi( '//localhost:4242/w/api.php' );
 
                this.server.respond( function ( request ) {
                        request.respond( 200, { 'Content-Type': 'application/json' }, '[]' );
                } );
 
-               api.get( {} );
+               return api.get( {} );
        } );
 
        QUnit.test( 'origin is included in POST requests', function ( assert ) {
-               QUnit.expect( 2 );
                var api = new mw.ForeignApi( '//localhost:4242/w/api.php' );
 
                this.server.respond( function ( request ) {
@@ -33,7 +26,7 @@
                        request.respond( 200, { 'Content-Type': 'application/json' }, '[]' );
                } );
 
-               api.post( {} );
+               return api.post( {} );
        } );
 
 }( mediaWiki ) );