build: Enable qunit/no-assert-equal and enforce
[lhc/web/wiklou.git] / tests / qunit / data / testrunner.js
index 06c146c..d8972ab 100644 (file)
@@ -40,7 +40,7 @@
         * Configuration
         */
 
-       // For each test() that is asynchronous, allow this time to pass before
+       // For each test that is asynchronous, allow this time to pass before
        // killing the test and assuming timeout failure.
        QUnit.config.testTimeout = 60 * 1000;
 
        }() );
 
        /**
-        * Reset mw.config and others to a fresh copy of the live config for each test(),
+        * Reset mw.config and others to a fresh copy of the live config for each test,
         * and restore it back to the live one afterwards.
         *
         * @param {Object} [localEnv]
        } ) );
 
        QUnit.test( 'Setup', function ( assert ) {
-               assert.equal( mw.html.escape( 'foo' ), 'mocked', 'setup() callback was ran.' );
-               assert.equal( mw.config.get( 'testVar' ), 'foo', 'config object applied' );
-               assert.equal( mw.messages.get( 'testMsg' ), 'Foo.', 'messages object applied' );
+               assert.strictEqual( mw.html.escape( 'foo' ), 'mocked', 'setup() callback was ran.' );
+               assert.strictEqual( mw.config.get( 'testVar' ), 'foo', 'config object applied' );
+               assert.strictEqual( mw.messages.get( 'testMsg' ), 'Foo.', 'messages object applied' );
 
                mw.config.set( 'testVar', 'bar' );
                mw.messages.set( 'testMsg', 'Bar.' );
        } );
 
        QUnit.test( 'Teardown', function ( assert ) {
-               assert.equal( mw.config.get( 'testVar' ), 'foo', 'config object restored and re-applied after test()' );
-               assert.equal( mw.messages.get( 'testMsg' ), 'Foo.', 'messages object restored and re-applied after test()' );
+               assert.strictEqual( mw.config.get( 'testVar' ), 'foo', 'config object restored and re-applied after test()' );
+               assert.strictEqual( mw.messages.get( 'testMsg' ), 'Foo.', 'messages object restored and re-applied after test()' );
        } );
 
        QUnit.test( 'Loader status', function ( assert ) {
        QUnit.module( 'testrunner-after', QUnit.newMwEnvironment() );
 
        QUnit.test( 'Teardown', function ( assert ) {
-               assert.equal( mw.html.escape( '<' ), '&lt;', 'teardown() callback was ran.' );
-               assert.equal( mw.config.get( 'testVar' ), null, 'config object restored to live in next module()' );
-               assert.equal( mw.messages.get( 'testMsg' ), null, 'messages object restored to live in next module()' );
+               assert.strictEqual( mw.html.escape( '<' ), '&lt;', 'teardown() callback was ran.' );
+               assert.strictEqual( mw.config.get( 'testVar' ), null, 'config object restored to live in next module()' );
+               assert.strictEqual( mw.messages.get( 'testMsg' ), null, 'messages object restored to live in next module()' );
        } );
 
        QUnit.module( 'testrunner-each', {
                mw.html = null;
        } );
        QUnit.test( 'afterEach', function ( assert ) {
-               assert.equal( mw.html.escape( '<' ), '&lt;', 'afterEach() ran' );
+               assert.strictEqual( mw.html.escape( '<' ), '&lt;', 'afterEach() ran' );
        } );
 
        QUnit.module( 'testrunner-each-compat', {
+               // eslint-disable-next-line qunit/no-setup-teardown
                setup: function () {
                        this.mwHtmlLive = mw.html;
                },
+               // eslint-disable-next-line qunit/no-setup-teardown
                teardown: function () {
                        mw.html = this.mwHtmlLive;
                }
                mw.html = null;
        } );
        QUnit.test( 'teardown', function ( assert ) {
-               assert.equal( mw.html.escape( '<' ), '&lt;', 'teardown() ran' );
+               assert.strictEqual( mw.html.escape( '<' ), '&lt;', 'teardown() ran' );
        } );
 
        // Regression test for 'this.sandbox undefined' error, fixed by