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/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 分'); }); }); 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"