mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-04 19:28:19 +00:00
e315e954a6
Removing csslint rather than replacing it with stylelint as there are no CSS or LESS files in this repo. Also bumping banana and jsonlint to latest. Change-Id: I9ffce273f63b061e07c3fa90ab4e82b5e551aa92
16 lines
515 B
JavaScript
16 lines
515 B
JavaScript
( 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 ) );
|