From 8391a448c3bfbc603c4e364af07500210583e60a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 14 Jan 2018 13:11:22 -0500 Subject: [PATCH] Update tests to emberjs/rfcs#232 format. --- package.json | 1 + .../components/copy-clipboard-test.js | 34 +++++++++--------- .../components/ember-cli-usage-test.js | 18 +++++----- .../components/files-table-test.js | 35 ++++++++++--------- .../components/project-listing-test.js | 35 ++++++++++--------- .../components/project-listing/beta-test.js | 35 ++++++++++--------- .../components/release-timeline-test.js | 35 ++++++++++--------- .../components/remove-spinner-test.js | 34 +++++++++--------- tests/integration/helpers/capitalize-test.js | 20 ++++++----- tests/unit/controllers/beta-test.js | 18 +++++----- tests/unit/controllers/canary-test.js | 18 +++++----- tests/unit/controllers/release-test.js | 18 +++++----- tests/unit/controllers/tagged-test.js | 18 +++++----- tests/unit/helpers/format-date-time-test.js | 12 +++---- tests/unit/helpers/params-test.js | 12 +++---- tests/unit/helpers/printf-test.js | 18 +++++----- tests/unit/helpers/script-tag-test.js | 12 +++---- tests/unit/helpers/tag-url-path-test.js | 12 +++---- tests/unit/mixins/projects-test.js | 14 ++++---- tests/unit/routes/beta-test.js | 16 ++++----- tests/unit/routes/canary-test.js | 16 ++++----- tests/unit/routes/release-test.js | 16 ++++----- tests/unit/routes/tagged-test.js | 16 ++++----- yarn.lock | 15 +++++++- 24 files changed, 252 insertions(+), 226 deletions(-) diff --git a/package.json b/package.json index 8735377..6b7af9d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "ember-cli-uglify": "^2.0.0", "ember-export-application-global": "^2.0.0", "ember-load-initializers": "^1.0.0", + "ember-maybe-import-regenerator": "^0.1.6", "ember-moment": "^7.5.0", "ember-resolver": "^4.4.0", "ember-source": "~2.18.0", diff --git a/tests/integration/components/copy-clipboard-test.js b/tests/integration/components/copy-clipboard-test.js index 9d5cbc8..02f75fd 100644 --- a/tests/integration/components/copy-clipboard-test.js +++ b/tests/integration/components/copy-clipboard-test.js @@ -1,24 +1,26 @@ -import { moduleForComponent, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -moduleForComponent('copy-clipboard', 'Integration | Component | copy clipboard', { - integration: true -}); +module('Integration | Component | copy clipboard', function(hooks) { + setupRenderingTest(hooks); -test('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); + test('it renders', async function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{copy-clipboard}}`); + await render(hbs`{{copy-clipboard}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); - // Template block usage: - this.render(hbs` - {{#copy-clipboard}} - template block text - {{/copy-clipboard}} - `); + // Template block usage: + await render(hbs` + {{#copy-clipboard}} + template block text + {{/copy-clipboard}} + `); - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$().text().trim(), 'template block text'); + }); }); diff --git a/tests/integration/components/ember-cli-usage-test.js b/tests/integration/components/ember-cli-usage-test.js index 46c886a..046d764 100644 --- a/tests/integration/components/ember-cli-usage-test.js +++ b/tests/integration/components/ember-cli-usage-test.js @@ -1,13 +1,15 @@ -import { moduleForComponent, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -moduleForComponent('ember-cli-usage', 'Integration | Component | ember cli usage', { - integration: true -}); +module('Integration | Component | ember cli usage', function(hooks) { + setupRenderingTest(hooks); -test('it renders nothing if project doesn\'t install with Ember CLI', function(assert) { - this.project = { installWithEmberCLI: false }; - this.render(hbs`{{ember-cli-usage project=project}}`); + test('it renders nothing if project doesn\'t install with Ember CLI', async function(assert) { + this.project = { installWithEmberCLI: false }; + await render(hbs`{{ember-cli-usage project=project}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); + }); }); diff --git a/tests/integration/components/files-table-test.js b/tests/integration/components/files-table-test.js index 43708c7..d6695de 100644 --- a/tests/integration/components/files-table-test.js +++ b/tests/integration/components/files-table-test.js @@ -1,25 +1,26 @@ -import { moduleForComponent } from 'ember-qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { skip } from 'qunit'; +import { module, skip } from 'qunit'; -moduleForComponent('files-table', 'Integration | Component | files table', { - integration: true -}); +module('Integration | Component | files table', function(hooks) { + setupRenderingTest(hooks); -skip('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); + skip('it renders', function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{files-table}}`); + this.render(hbs`{{files-table}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); - // Template block usage: - this.render(hbs` - {{#files-table}} - template block text - {{/files-table}} - `); + // Template block usage: + this.render(hbs` + {{#files-table}} + template block text + {{/files-table}} + `); - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$().text().trim(), 'template block text'); + }); }); diff --git a/tests/integration/components/project-listing-test.js b/tests/integration/components/project-listing-test.js index 7318a2b..d282471 100644 --- a/tests/integration/components/project-listing-test.js +++ b/tests/integration/components/project-listing-test.js @@ -1,25 +1,26 @@ -import { moduleForComponent } from 'ember-qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { skip } from 'qunit'; +import { module, skip } from 'qunit'; -moduleForComponent('project-listing', 'Integration | Component | project listing', { - integration: true -}); +module('Integration | Component | project listing', function(hooks) { + setupRenderingTest(hooks); -skip('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); + skip('it renders', function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{project-listing}}`); + this.render(hbs`{{project-listing}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); - // Template block usage: - this.render(hbs` - {{#project-listing}} - template block text - {{/project-listing}} - `); + // Template block usage: + this.render(hbs` + {{#project-listing}} + template block text + {{/project-listing}} + `); - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$().text().trim(), 'template block text'); + }); }); diff --git a/tests/integration/components/project-listing/beta-test.js b/tests/integration/components/project-listing/beta-test.js index 8b7cc41..0edbf18 100644 --- a/tests/integration/components/project-listing/beta-test.js +++ b/tests/integration/components/project-listing/beta-test.js @@ -1,25 +1,26 @@ -import { moduleForComponent } from 'ember-qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { skip } from 'qunit'; +import { module, skip } from 'qunit'; -moduleForComponent('project-listing/beta', 'Integration | Component | project listing/beta', { - integration: true -}); +module('Integration | Component | project listing/beta', function(hooks) { + setupRenderingTest(hooks); -skip('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); + skip('it renders', function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{project-listing/beta}}`); + this.render(hbs`{{project-listing/beta}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); - // Template block usage: - this.render(hbs` - {{#project-listing/beta}} - template block text - {{/project-listing/beta}} - `); + // Template block usage: + this.render(hbs` + {{#project-listing/beta}} + template block text + {{/project-listing/beta}} + `); - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$().text().trim(), 'template block text'); + }); }); diff --git a/tests/integration/components/release-timeline-test.js b/tests/integration/components/release-timeline-test.js index 016a03f..eff6dfe 100644 --- a/tests/integration/components/release-timeline-test.js +++ b/tests/integration/components/release-timeline-test.js @@ -1,25 +1,26 @@ -import { moduleForComponent } from 'ember-qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -import { skip } from 'qunit'; +import { module, skip } from 'qunit'; -moduleForComponent('release-timeline', 'Integration | Component | release timeline', { - integration: true -}); +module('Integration | Component | release timeline', function(hooks) { + setupRenderingTest(hooks); -skip('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); + skip('it renders', function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{release-timeline}}`); + this.render(hbs`{{release-timeline}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); - // Template block usage: - this.render(hbs` - {{#release-timeline}} - template block text - {{/release-timeline}} - `); + // Template block usage: + this.render(hbs` + {{#release-timeline}} + template block text + {{/release-timeline}} + `); - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$().text().trim(), 'template block text'); + }); }); diff --git a/tests/integration/components/remove-spinner-test.js b/tests/integration/components/remove-spinner-test.js index b5a7fe1..8fff1ae 100644 --- a/tests/integration/components/remove-spinner-test.js +++ b/tests/integration/components/remove-spinner-test.js @@ -1,24 +1,26 @@ -import { moduleForComponent, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -moduleForComponent('remove-spinner', 'Integration | Component | remove spinner', { - integration: true -}); +module('Integration | Component | remove spinner', function(hooks) { + setupRenderingTest(hooks); -test('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); + test('it renders', async function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); - this.render(hbs`{{remove-spinner}}`); + await render(hbs`{{remove-spinner}}`); - assert.equal(this.$().text().trim(), ''); + assert.equal(this.$().text().trim(), ''); - // Template block usage: - this.render(hbs` - {{#remove-spinner}} - template block text - {{/remove-spinner}} - `); + // Template block usage: + await render(hbs` + {{#remove-spinner}} + template block text + {{/remove-spinner}} + `); - assert.equal(this.$().text().trim(), 'template block text'); + assert.equal(this.$().text().trim(), 'template block text'); + }); }); diff --git a/tests/integration/helpers/capitalize-test.js b/tests/integration/helpers/capitalize-test.js index 24620db..dce36c8 100644 --- a/tests/integration/helpers/capitalize-test.js +++ b/tests/integration/helpers/capitalize-test.js @@ -1,17 +1,19 @@ -import { moduleForComponent, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -moduleForComponent('capitalize', 'helper:capitalize', { - integration: true -}); +module('helper:capitalize', function(hooks) { + setupRenderingTest(hooks); -// Replace this with your real tests. -test('it renders', function(assert) { - this.set('inputValue', '1234'); + // Replace this with your real tests. + test('it renders', async function(assert) { + this.set('inputValue', '1234'); - this.render(hbs`{{capitalize inputValue}}`); + await render(hbs`{{capitalize inputValue}}`); - assert.equal(this.$().text().trim(), '1234'); + assert.equal(this.$().text().trim(), '1234'); + }); }); diff --git a/tests/unit/controllers/beta-test.js b/tests/unit/controllers/beta-test.js index 37e2325..c352f55 100644 --- a/tests/unit/controllers/beta-test.js +++ b/tests/unit/controllers/beta-test.js @@ -1,12 +1,12 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('controller:beta', 'Unit | Controller | beta', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Controller | beta', function(hooks) { + setupTest(hooks); -// Replace this with your real tests. -test('it exists', function(assert) { - let controller = this.subject(); - assert.ok(controller); + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:beta'); + assert.ok(controller); + }); }); diff --git a/tests/unit/controllers/canary-test.js b/tests/unit/controllers/canary-test.js index 6ec9e7d..0bc013e 100644 --- a/tests/unit/controllers/canary-test.js +++ b/tests/unit/controllers/canary-test.js @@ -1,12 +1,12 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('controller:canary', 'Unit | Controller | canary', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Controller | canary', function(hooks) { + setupTest(hooks); -// Replace this with your real tests. -test('it exists', function(assert) { - let controller = this.subject(); - assert.ok(controller); + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:canary'); + assert.ok(controller); + }); }); diff --git a/tests/unit/controllers/release-test.js b/tests/unit/controllers/release-test.js index 2201d17..8178ecb 100644 --- a/tests/unit/controllers/release-test.js +++ b/tests/unit/controllers/release-test.js @@ -1,12 +1,12 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('controller:release', 'Unit | Controller | release', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Controller | release', function(hooks) { + setupTest(hooks); -// Replace this with your real tests. -test('it exists', function(assert) { - let controller = this.subject(); - assert.ok(controller); + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:release'); + assert.ok(controller); + }); }); diff --git a/tests/unit/controllers/tagged-test.js b/tests/unit/controllers/tagged-test.js index daae370..3f7aa6a 100644 --- a/tests/unit/controllers/tagged-test.js +++ b/tests/unit/controllers/tagged-test.js @@ -1,12 +1,12 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('controller:tagged', 'Unit | Controller | tagged', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Controller | tagged', function(hooks) { + setupTest(hooks); -// Replace this with your real tests. -test('it exists', function(assert) { - let controller = this.subject(); - assert.ok(controller); + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:tagged'); + assert.ok(controller); + }); }); diff --git a/tests/unit/helpers/format-date-time-test.js b/tests/unit/helpers/format-date-time-test.js index 9b0de35..52d1ae9 100644 --- a/tests/unit/helpers/format-date-time-test.js +++ b/tests/unit/helpers/format-date-time-test.js @@ -1,10 +1,10 @@ import { formatDateTime } from 'builds/helpers/format-date-time'; import { module, test } from 'qunit'; -module('Unit | Helper | format date time'); - -// Replace this with your real tests. -test('it works', function(assert) { - let result = formatDateTime([42]); - assert.ok(result); +module('Unit | Helper | format date time', function() { + // Replace this with your real tests. + test('it works', function(assert) { + let result = formatDateTime([42]); + assert.ok(result); + }); }); diff --git a/tests/unit/helpers/params-test.js b/tests/unit/helpers/params-test.js index 217f1fa..18c3458 100644 --- a/tests/unit/helpers/params-test.js +++ b/tests/unit/helpers/params-test.js @@ -1,10 +1,10 @@ import { params } from 'builds/helpers/params'; import { module, test } from 'qunit'; -module('Unit | Helper | params'); - -// Replace this with your real tests. -test('it works', function(assert) { - let result = params([42]); - assert.ok(result); +module('Unit | Helper | params', function() { + // Replace this with your real tests. + test('it works', function(assert) { + let result = params([42]); + assert.ok(result); + }); }); diff --git a/tests/unit/helpers/printf-test.js b/tests/unit/helpers/printf-test.js index 1bf919f..d7ddf12 100644 --- a/tests/unit/helpers/printf-test.js +++ b/tests/unit/helpers/printf-test.js @@ -1,14 +1,14 @@ import { printf } from 'builds/helpers/printf'; import { module, test } from 'qunit'; -module('Unit | Helper | printf'); +module('Unit | Helper | printf', function() { + test('it replaces single %s with value', function(assert) { + let result = printf(["~%s~", 42]); + assert.equal(result, "~42~"); + }); -test('it replaces single %s with value', function(assert) { - let result = printf(["~%s~", 42]); - assert.equal(result, "~42~"); -}); - -test('it replaces multilpe %s with value', function(assert) { - let result = printf(["~%s~%s~", 42]); - assert.equal(result, "~42~42~"); + test('it replaces multilpe %s with value', function(assert) { + let result = printf(["~%s~%s~", 42]); + assert.equal(result, "~42~42~"); + }); }); diff --git a/tests/unit/helpers/script-tag-test.js b/tests/unit/helpers/script-tag-test.js index 5eefa1c..0a21638 100644 --- a/tests/unit/helpers/script-tag-test.js +++ b/tests/unit/helpers/script-tag-test.js @@ -1,10 +1,10 @@ import { scriptTag } from 'builds/helpers/script-tag'; import { module, test } from 'qunit'; -module('Unit | Helper | script tag'); - -// Replace this with your real tests. -test('it works', function(assert) { - let result = scriptTag([42]); - assert.ok(result); +module('Unit | Helper | script tag', function() { + // Replace this with your real tests. + test('it works', function(assert) { + let result = scriptTag([42]); + assert.ok(result); + }); }); diff --git a/tests/unit/helpers/tag-url-path-test.js b/tests/unit/helpers/tag-url-path-test.js index bb80436..8c8512b 100644 --- a/tests/unit/helpers/tag-url-path-test.js +++ b/tests/unit/helpers/tag-url-path-test.js @@ -1,10 +1,10 @@ import { tagUrlPath } from 'builds/helpers/tag-url-path'; import { module, test } from 'qunit'; -module('Unit | Helper | tag url path'); - -// Replace this with your real tests. -test('it works', function(assert) { - let result = tagUrlPath(["http://example.org/tags/v1.10.0"]); - assert.equal(result, "tags/v1.10.0"); +module('Unit | Helper | tag url path', function() { + // Replace this with your real tests. + test('it works', function(assert) { + let result = tagUrlPath(["http://example.org/tags/v1.10.0"]); + assert.equal(result, "tags/v1.10.0"); + }); }); diff --git a/tests/unit/mixins/projects-test.js b/tests/unit/mixins/projects-test.js index 6aabe78..bff69ea 100644 --- a/tests/unit/mixins/projects-test.js +++ b/tests/unit/mixins/projects-test.js @@ -2,11 +2,11 @@ import EmberObject from '@ember/object'; import ProjectsMixin from 'builds/mixins/projects'; import { module, test } from 'qunit'; -module('Unit | Mixin | projects'); - -// Replace this with your real tests. -test('it works', function(assert) { - let ProjectsObject = EmberObject.extend(ProjectsMixin); - let subject = ProjectsObject.create(); - assert.ok(subject); +module('Unit | Mixin | projects', function() { + // Replace this with your real tests. + test('it works', function(assert) { + let ProjectsObject = EmberObject.extend(ProjectsMixin); + let subject = ProjectsObject.create(); + assert.ok(subject); + }); }); diff --git a/tests/unit/routes/beta-test.js b/tests/unit/routes/beta-test.js index 2277aeb..7ff86cd 100644 --- a/tests/unit/routes/beta-test.js +++ b/tests/unit/routes/beta-test.js @@ -1,11 +1,11 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('route:beta', 'Unit | Route | beta', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Route | beta', function(hooks) { + setupTest(hooks); -test('it exists', function(assert) { - let route = this.subject(); - assert.ok(route); + test('it exists', function(assert) { + let route = this.owner.lookup('route:beta'); + assert.ok(route); + }); }); diff --git a/tests/unit/routes/canary-test.js b/tests/unit/routes/canary-test.js index d5249e5..1050dc8 100644 --- a/tests/unit/routes/canary-test.js +++ b/tests/unit/routes/canary-test.js @@ -1,11 +1,11 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('route:canary', 'Unit | Route | canary', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Route | canary', function(hooks) { + setupTest(hooks); -test('it exists', function(assert) { - let route = this.subject(); - assert.ok(route); + test('it exists', function(assert) { + let route = this.owner.lookup('route:canary'); + assert.ok(route); + }); }); diff --git a/tests/unit/routes/release-test.js b/tests/unit/routes/release-test.js index 17a225e..b6800e6 100644 --- a/tests/unit/routes/release-test.js +++ b/tests/unit/routes/release-test.js @@ -1,11 +1,11 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('route:release', 'Unit | Route | release', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Route | release', function(hooks) { + setupTest(hooks); -test('it exists', function(assert) { - let route = this.subject(); - assert.ok(route); + test('it exists', function(assert) { + let route = this.owner.lookup('route:release'); + assert.ok(route); + }); }); diff --git a/tests/unit/routes/tagged-test.js b/tests/unit/routes/tagged-test.js index 87997bc..6cd9468 100644 --- a/tests/unit/routes/tagged-test.js +++ b/tests/unit/routes/tagged-test.js @@ -1,11 +1,11 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('route:tagged', 'Unit | Route | tagged', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); +module('Unit | Route | tagged', function(hooks) { + setupTest(hooks); -test('it exists', function(assert) { - let route = this.subject(); - assert.ok(route); + test('it exists', function(assert) { + let route = this.owner.lookup('route:tagged'); + assert.ok(route); + }); }); diff --git a/yarn.lock b/yarn.lock index f9e00ba..0c34084 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2099,7 +2099,7 @@ ember-cli-app-version@^3.1.0: ember-cli-babel "^6.8.0" git-repo-version "^1.0.0" -ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.10.0, ember-cli-babel@^6.3.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2: +ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.10.0, ember-cli-babel@^6.3.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2: version "6.11.0" resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.11.0.tgz#79cb184bac3c05bfe181ddc306bac100ab1f9493" dependencies: @@ -2598,6 +2598,15 @@ ember-macro-helpers@^0.17.0: ember-cli-test-info "^1.0.0" ember-weakmap "^3.0.0" +ember-maybe-import-regenerator@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ember-maybe-import-regenerator/-/ember-maybe-import-regenerator-0.1.6.tgz#35d41828afa6d6a59bc0da3ce47f34c573d776ca" + dependencies: + broccoli-funnel "^1.0.1" + broccoli-merge-trees "^1.0.0" + ember-cli-babel "^6.0.0-beta.4" + regenerator-runtime "^0.9.5" + ember-moment@^7.5.0: version "7.5.0" resolved "https://registry.yarnpkg.com/ember-moment/-/ember-moment-7.5.0.tgz#9ed25b32ae941b2f1d9116c44f518a52bdb01722" @@ -5642,6 +5651,10 @@ regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" +regenerator-runtime@^0.9.5: + version "0.9.6" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029" + regenerator-transform@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"