diff --git a/blueprints/adapter-test/qunit-files/tests/unit/__path__/__test__.js b/blueprints/adapter-test/qunit-files/tests/unit/__path__/__test__.js index 739d5eb7303..8fc52439de3 100644 --- a/blueprints/adapter-test/qunit-files/tests/unit/__path__/__test__.js +++ b/blueprints/adapter-test/qunit-files/tests/unit/__path__/__test__.js @@ -1,12 +1,12 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('adapter:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. - // needs: ['serializer:foo'] -}); +module('<%= friendlyTestDescription %>', function(hooks) { + setupTest(hooks); -// Replace this with your real tests. -test('it exists', function(assert) { - let adapter = this.subject(); - assert.ok(adapter); + // Replace this with your real tests. + test('it exists', function(assert) { + let adapter = this.owner.lookup('adapter:<%= dasherizedModuleName %>'); + assert.ok(adapter); + }); }); diff --git a/blueprints/adapter-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js b/blueprints/adapter-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js deleted file mode 100644 index 8fc52439de3..00000000000 --- a/blueprints/adapter-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('<%= friendlyTestDescription %>', function(hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function(assert) { - let adapter = this.owner.lookup('adapter:<%= dasherizedModuleName %>'); - assert.ok(adapter); - }); -}); diff --git a/blueprints/model-test/qunit-files/tests/unit/__path__/__test__.js b/blueprints/model-test/qunit-files/tests/unit/__path__/__test__.js index d7d880b44a6..84dbd712791 100644 --- a/blueprints/model-test/qunit-files/tests/unit/__path__/__test__.js +++ b/blueprints/model-test/qunit-files/tests/unit/__path__/__test__.js @@ -1,12 +1,14 @@ -import { moduleForModel, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; +import { run } from '@ember/runloop'; -moduleForModel('<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. -<%= typeof needs !== 'undefined' ? needs : '' %> -}); +module('<%= friendlyTestDescription %>', function(hooks) { + setupTest(hooks); -test('it exists', function(assert) { - let model = this.subject(); - // let store = this.store(); - assert.ok(!!model); + // Replace this with your real tests. + test('it exists', function(assert) { + let store = this.owner.lookup('service:store'); + let model = run(() => store.createRecord('<%= dasherizedModuleName %>', {})); + assert.ok(model); + }); }); diff --git a/blueprints/model-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js b/blueprints/model-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js deleted file mode 100644 index 84dbd712791..00000000000 --- a/blueprints/model-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js +++ /dev/null @@ -1,14 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; -import { run } from '@ember/runloop'; - -module('<%= friendlyTestDescription %>', function(hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function(assert) { - let store = this.owner.lookup('service:store'); - let model = run(() => store.createRecord('<%= dasherizedModuleName %>', {})); - assert.ok(model); - }); -}); diff --git a/blueprints/serializer-test/qunit-files/tests/unit/__path__/__test__.js b/blueprints/serializer-test/qunit-files/tests/unit/__path__/__test__.js index bfc3aa943ca..0a72b125520 100644 --- a/blueprints/serializer-test/qunit-files/tests/unit/__path__/__test__.js +++ b/blueprints/serializer-test/qunit-files/tests/unit/__path__/__test__.js @@ -1,15 +1,24 @@ -import { moduleForModel, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; +import { run } from '@ember/runloop'; -moduleForModel('<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. - needs: ['serializer:<%= dasherizedModuleName %>'] -}); +module('<%= friendlyTestDescription %>', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let store = this.owner.lookup('service:store'); + let serializer = store.serializerFor('<%= dasherizedModuleName %>'); + + assert.ok(serializer); + }); -// Replace this with your real tests. -test('it serializes records', function(assert) { - let record = this.subject(); + test('it serializes records', function(assert) { + let store = this.owner.lookup('service:store'); + let record = run(() => store.createRecord('<%= dasherizedModuleName %>', {})); - let serializedRecord = record.serialize(); + let serializedRecord = record.serialize(); - assert.ok(serializedRecord); + assert.ok(serializedRecord); + }); }); diff --git a/blueprints/serializer-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js b/blueprints/serializer-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js deleted file mode 100644 index 0a72b125520..00000000000 --- a/blueprints/serializer-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js +++ /dev/null @@ -1,24 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; -import { run } from '@ember/runloop'; - -module('<%= friendlyTestDescription %>', function(hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function(assert) { - let store = this.owner.lookup('service:store'); - let serializer = store.serializerFor('<%= dasherizedModuleName %>'); - - assert.ok(serializer); - }); - - test('it serializes records', function(assert) { - let store = this.owner.lookup('service:store'); - let record = run(() => store.createRecord('<%= dasherizedModuleName %>', {})); - - let serializedRecord = record.serialize(); - - assert.ok(serializedRecord); - }); -}); diff --git a/blueprints/transform-test/qunit-files/tests/unit/__path__/__test__.js b/blueprints/transform-test/qunit-files/tests/unit/__path__/__test__.js index ef14ae150b3..e4f745717d3 100644 --- a/blueprints/transform-test/qunit-files/tests/unit/__path__/__test__.js +++ b/blueprints/transform-test/qunit-files/tests/unit/__path__/__test__.js @@ -1,12 +1,12 @@ -import { moduleFor, test } from 'ember-qunit'; +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; -moduleFor('transform:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { - // Specify the other units that are required for this test. - // needs: ['serializer:foo'] -}); +module('transform:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', function(hooks) { + setupTest(hooks); -// Replace this with your real tests. -test('it exists', function(assert) { - let transform = this.subject(); - assert.ok(transform); + // Replace this with your real tests. + test('it exists', function(assert) { + let transform = this.owner.lookup('transform:<%= dasherizedModuleName %>'); + assert.ok(transform); + }); }); diff --git a/blueprints/transform-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js b/blueprints/transform-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js deleted file mode 100644 index e4f745717d3..00000000000 --- a/blueprints/transform-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('transform:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', function(hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function(assert) { - let transform = this.owner.lookup('transform:<%= dasherizedModuleName %>'); - assert.ok(transform); - }); -});