mediawiki-extensions-Thanks/tests/qunit/test_ext.thanks.mobilediff.js
James D. Forrester e315e954a6 build: Replace jshint and jscs with eslint; drop csslint
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
2017-08-03 17:24:34 -07:00

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 ) );