( function ( $, mw ) {
	QUnit.module( 'Thanks mobilediff' );

	QUnit.test( 'render button for logged in users', 1, function ( assert ) {
		var $container = $( '<div>' ),
			$user = $( '<div>' ).data( 'user-name', 'jon' )
				.data( 'revision-id', 1 )
				.data( 'user-gender', 'male' );

		// eslint-disable-next-line no-underscore-dangle
		mw.thanks._mobileDiffInit( $user, $container );
		assert.strictEqual( $container.find( 'button' ).length, 1, 'Thanks button was created.' );
	} );

}( jQuery, mediaWiki ) );

( function ( $, mw ) {
	QUnit.module( 'Thanks mobilediff' );

	QUnit.test( 'render button for logged in users', function ( assert ) {
		var $container = $( '<div>' ),
			$user = $( '<div>' ).data( 'user-name', 'jon' )
				.data( 'revision-id', 1 )
				.data( 'user-gender', 'male' );

		// eslint-disable-next-line no-underscore-dangle
		mw.thanks._mobileDiffInit( $user, $container );
		assert.strictEqual( $container.find( 'button' ).length, 1, 'Thanks button was created.' );
	} );

}( jQuery, mediaWiki ) );

Make compartible with QUnit 2
tests: Make compartible with QUnit 2

Change-Id: I726d7f75e37a759e1b1f6372710cb06f754fc94b
