From 89e011577751bd0703f32d35557747da3f5cbf73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 13:39:28 +0000 Subject: [PATCH 1/4] Bump eslint-plugin-qunit from 4.0.0 to 6.2.0 Bumps [eslint-plugin-qunit](https://github.com/platinumazure/eslint-plugin-qunit) from 4.0.0 to 6.2.0. - [Release notes](https://github.com/platinumazure/eslint-plugin-qunit/releases) - [Changelog](https://github.com/platinumazure/eslint-plugin-qunit/blob/master/CHANGELOG.md) - [Commits](https://github.com/platinumazure/eslint-plugin-qunit/compare/v4.0.0...v6.2.0) --- updated-dependencies: - dependency-name: eslint-plugin-qunit dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 41 +++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index f2c637d7293..dbab54905a2 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "eslint-plugin-import": "^2.22.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", - "eslint-plugin-qunit": "^4.0.0", + "eslint-plugin-qunit": "^6.2.0", "execa": "^5.1.1", "expect-type": "^0.12.0", "express": "^4.17.1", diff --git a/yarn.lock b/yarn.lock index eb318552378..d4d8a4c0db3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4951,7 +4951,7 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@~4.1.0: dependencies: ms "^2.1.1" -debug@^4.3.1: +debug@^4.3.1, debug@~4.3.1, debug@~4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -4965,13 +4965,6 @@ debug@~3.1.0: dependencies: ms "2.0.0" -debug@~4.3.1, debug@~4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - decamelize-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -5903,10 +5896,13 @@ eslint-plugin-prettier@^3.4.1: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-qunit@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-4.0.0.tgz#5945ba3434bfe8879bea195192e906701051cf01" - integrity "sha1-WUW6NDS/6Ieb6hlRkukGcBBRzwE= sha512-+0i2xcYryUoLawi47Lp0iJKzkP931G5GXwIOq1KBKQc2pknV1VPjfE6b4mI2mR2RnL7WRoS30YjwC9SjQgJDXQ==" +eslint-plugin-qunit@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-6.2.0.tgz#f4efda29da99523e560848d9592c39c0590c308d" + integrity sha512-KvPmkIC2MHpfRxs/r8WUeeGkG6y+3qwSi2AZIBtjcM/YG6Z3k0GxW5Hbu3l7X0TDhljVCeBb9Q5puUkHzl83Mw== + dependencies: + eslint-utils "^3.0.0" + requireindex "^1.2.0" eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" @@ -5916,20 +5912,20 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" - integrity "sha1-e+HMcPJ6cqds0UqmmLyr7WiQ4c0= sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==" - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^2.1.0: +eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" integrity "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc= sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==" dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" @@ -10223,6 +10219,11 @@ require-relative@^0.8.7: resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" integrity "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4= sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==" +requireindex@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" + integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== + requireindex@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" From 5a8acae5c4225326bd4dc80318507492f55d9446 Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Fri, 1 Oct 2021 14:52:21 +0100 Subject: [PATCH 2/4] run eslint fix --- tests/node/build-info-test.js | 8 ++++---- tests/node/overrides-test.js | 18 +++++++++--------- tests/node/visit-test.js | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/node/build-info-test.js b/tests/node/build-info-test.js index 22f86f73a69..7261d1b38a9 100644 --- a/tests/node/build-info-test.js +++ b/tests/node/build-info-test.js @@ -32,7 +32,7 @@ QUnit.module('buildVersion', () => { ], padEmptyArgs(3, [null, '']) ).forEach(({ args, expected }) => { - QUnit.test(JSON.stringify(args), (assert) => { + QUnit.test(JSON.stringify(args), function (assert) { assert.equal(buildVersion(...args), expected); }); }); @@ -49,12 +49,12 @@ QUnit.module('parseTagVersion', () => { expected: '3.1.1-beta.2', }, ].forEach(({ tag, expected }) => { - QUnit.test(JSON.stringify(tag), (assert) => { + QUnit.test(JSON.stringify(tag), function (assert) { assert.equal(parseTagVersion(tag), expected); }); }); - QUnit.test('parseTagVersion raises on non-semver tags', (assert) => { + QUnit.test('parseTagVersion raises on non-semver tags', function (assert) { assert.throws(() => { parseTagVersion('some-non-version-tag'); }); @@ -127,7 +127,7 @@ QUnit.module('buildFromParts', () => { }, }, ].forEach(({ args, expected }) => { - QUnit.test(JSON.stringify(args), (assert) => { + QUnit.test(JSON.stringify(args), function (assert) { assert.deepEqual(buildFromParts(...args), expected); }); }); diff --git a/tests/node/overrides-test.js b/tests/node/overrides-test.js index ab6f98e31c8..2a28c4e8129 100644 --- a/tests/node/overrides-test.js +++ b/tests/node/overrides-test.js @@ -560,25 +560,25 @@ QUnit.module('Overrides', function () { let project = new Project(fullExample()); let overrides = Overrides.for(project, { EMBER_ENV: 'production' }); - assert.strictEqual(overrides.hasOverrides, false, 'hasOverrides'); - assert.strictEqual(overrides.hasBuildTimeWarning, false, 'hasBuildTimeWarning'); + assert.false(overrides.hasOverrides, 'hasOverrides'); + assert.false(overrides.hasBuildTimeWarning, 'hasBuildTimeWarning'); }); QUnit.test('it does nothing when everything is on new babel', function (assert) { let overrides = new Overrides([]); - assert.strictEqual(overrides.hasOverrides, false, 'hasOverrides'); - assert.strictEqual(overrides.hasBuildTimeWarning, false, 'hasBuildTimeWarning'); + assert.false(overrides.hasOverrides, 'hasOverrides'); + assert.false(overrides.hasBuildTimeWarning, 'hasBuildTimeWarning'); }); QUnit.test('when app is on old babel', function (assert) { let overrides = new Overrides([infoForApp({ version: '6.0.0' })]); - assert.strictEqual(overrides.hasOverrides, true, 'hasOverrides'); - assert.strictEqual(overrides.hasBuildTimeWarning, true, 'hasBuildTimeWarning'); - assert.strictEqual(overrides.hasActionableSuggestions, true, 'hasActionableSuggestions'); - assert.strictEqual(overrides.hasCompatibleAddons, false, 'hasCompatibleAddons'); - assert.strictEqual(overrides.hasDormantAddons, false, 'hasDormantAddons'); + assert.true(overrides.hasOverrides, 'hasOverrides'); + assert.true(overrides.hasBuildTimeWarning, 'hasBuildTimeWarning'); + assert.true(overrides.hasActionableSuggestions, 'hasActionableSuggestions'); + assert.false(overrides.hasCompatibleAddons, 'hasCompatibleAddons'); + assert.false(overrides.hasDormantAddons, 'hasDormantAddons'); }); // let project, env; diff --git a/tests/node/visit-test.js b/tests/node/visit-test.js index 47452946ae1..517542483f3 100644 --- a/tests/node/visit-test.js +++ b/tests/node/visit-test.js @@ -87,7 +87,7 @@ QUnit.module('Ember.Application - visit() Integration Tests', function (hooks) { ), ]).then(function () { assert.ok(initCalled, 'Component#init should be called'); - assert.ok(!didInsertElementCalled, 'Component#didInsertElement should not be called'); + assert.notOk(didInsertElementCalled, 'Component#didInsertElement should not be called'); }); }); From 986787d20d6416fc1763f2dcc3b5a7e117fa23d2 Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Fri, 1 Oct 2021 15:01:17 +0100 Subject: [PATCH 3/4] disable qunit/no-test-expect-argument for (at)ember/string tests --- packages/@ember/string/tests/camelize_test.js | 1 + packages/@ember/string/tests/capitalize_test.js | 1 + packages/@ember/string/tests/classify_test.js | 1 + packages/@ember/string/tests/dasherize_test.js | 1 + packages/@ember/string/tests/decamelize_test.js | 1 + packages/@ember/string/tests/underscore_test.js | 1 + packages/@ember/string/tests/w_test.js | 1 + 7 files changed, 7 insertions(+) diff --git a/packages/@ember/string/tests/camelize_test.js b/packages/@ember/string/tests/camelize_test.js index 04d4015c39f..1cb053fa798 100644 --- a/packages/@ember/string/tests/camelize_test.js +++ b/packages/@ember/string/tests/camelize_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { camelize } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; diff --git a/packages/@ember/string/tests/capitalize_test.js b/packages/@ember/string/tests/capitalize_test.js index 593c81afda3..7b11679722a 100644 --- a/packages/@ember/string/tests/capitalize_test.js +++ b/packages/@ember/string/tests/capitalize_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { capitalize } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; diff --git a/packages/@ember/string/tests/classify_test.js b/packages/@ember/string/tests/classify_test.js index bb846c46bb2..5232ccbf8c5 100644 --- a/packages/@ember/string/tests/classify_test.js +++ b/packages/@ember/string/tests/classify_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { classify } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; diff --git a/packages/@ember/string/tests/dasherize_test.js b/packages/@ember/string/tests/dasherize_test.js index c29640412b7..9f41db6957b 100644 --- a/packages/@ember/string/tests/dasherize_test.js +++ b/packages/@ember/string/tests/dasherize_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { dasherize } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; diff --git a/packages/@ember/string/tests/decamelize_test.js b/packages/@ember/string/tests/decamelize_test.js index cc8aff312f6..f37af0c66a2 100644 --- a/packages/@ember/string/tests/decamelize_test.js +++ b/packages/@ember/string/tests/decamelize_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { decamelize } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; diff --git a/packages/@ember/string/tests/underscore_test.js b/packages/@ember/string/tests/underscore_test.js index 2baf836fe76..69a1b83b33b 100644 --- a/packages/@ember/string/tests/underscore_test.js +++ b/packages/@ember/string/tests/underscore_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { underscore } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; diff --git a/packages/@ember/string/tests/w_test.js b/packages/@ember/string/tests/w_test.js index 1357aa2fa40..e9fada90f2a 100644 --- a/packages/@ember/string/tests/w_test.js +++ b/packages/@ember/string/tests/w_test.js @@ -1,3 +1,4 @@ +/* eslint-disable qunit/no-test-expect-argument */ import { w } from '@ember/string'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; From c8393752e1f5d369f56c7c6726878cdd3e21dd9a Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Fri, 1 Oct 2021 15:01:43 +0100 Subject: [PATCH 4/4] disable qunit/no-qunit-stop lint in qunit testing adapter --- packages/ember-testing/lib/adapters/qunit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ember-testing/lib/adapters/qunit.js b/packages/ember-testing/lib/adapters/qunit.js index 7b3060f8b0b..eed764ceeb2 100644 --- a/packages/ember-testing/lib/adapters/qunit.js +++ b/packages/ember-testing/lib/adapters/qunit.js @@ -22,6 +22,7 @@ export default Adapter.extend({ asyncStart() { if (typeof QUnit.stop === 'function') { // very old QUnit version + // eslint-disable-next-line qunit/no-qunit-stop QUnit.stop(); } else { this.doneCallbacks.push(QUnit.config.current ? QUnit.config.current.assert.async() : null);