From f19ce17d0e6d3ce9685cd8ab36238131fa56e298 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Nov 2021 23:12:10 +0000 Subject: [PATCH 1/2] build(deps-dev): bump eslint-plugin-qunit from 6.2.0 to 7.0.0 Bumps [eslint-plugin-qunit](https://github.com/platinumazure/eslint-plugin-qunit) from 6.2.0 to 7.0.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/v6.2.0...v7.0.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 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b38910e..ad9b038 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "eslint-plugin-ember": "^10.5.4", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.4.1", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.0.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.3.2", diff --git a/yarn.lock b/yarn.lock index 90ad528..96e6480 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4795,10 +4795,10 @@ eslint-plugin-prettier@^3.4.1: dependencies: prettier-linter-helpers "^1.0.0" -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== +eslint-plugin-qunit@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-7.0.0.tgz#a782fafe930820f6b62880958ebc3e93de462f02" + integrity sha512-yPh02tbQoZK43voIfJFO9CUN5Q6j8ebfrnxEqPr7I4UiYln4RWKDQ4ajaHgV3gJKSAUZwymJ0DsB/YH6btRxIQ== dependencies: eslint-utils "^3.0.0" requireindex "^1.2.0" From ae29c356afad096112262e0c12dac5b1b5e6da87 Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Mon, 15 Nov 2021 11:55:03 +0100 Subject: [PATCH 2/2] refactor: use more accurate assertions --- tests/integration/helpers/reading-time-test.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/integration/helpers/reading-time-test.js b/tests/integration/helpers/reading-time-test.js index fed9e16..5056dfe 100644 --- a/tests/integration/helpers/reading-time-test.js +++ b/tests/integration/helpers/reading-time-test.js @@ -9,31 +9,37 @@ module('Integration | Helper | reading-time', function (hooks) { test('it renders reading-time without text', async function (assert) { this.set('value', undefined); await render(hbs`{{reading-time this.value}}`); - assert.equal(this.element.textContent.trim(), '1 minute'); + assert.dom().hasText('1 minute'); }); test('it renders reading-time text', async function (assert) { this.set('value', 'test'); + await render(hbs`{{reading-time this.value}}`); - assert.equal(this.element.textContent.trim(), '1 minute'); + + assert.dom().hasText('1 minute'); this.set( 'value', [...Array(1000).keys()].reduce((acc) => acc.concat('value '), '') ); - assert.equal(this.element.textContent.trim(), '5 minutes'); + + assert.dom().hasText('5 minutes'); }); test('it renders reading-time text in japanese', async function (assert) { this.set('value', 'test'); this.set('options', { language: 'ja' }); + await render(hbs`{{reading-time this.value this.options}}`); - assert.equal(this.element.textContent.trim(), '1 分'); + + assert.dom().hasText('1 分'); this.set( 'value', [...Array(1000).keys()].reduce((acc) => acc.concat('value '), '') ); - assert.equal(this.element.textContent.trim(), '5 分'); + + assert.dom().hasText('5 分'); }); });