ember-source 4.4.0-beta.1 → 4.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/blueprints/-utils.js +9 -0
  3. package/blueprints/acceptance-test/index.js +3 -1
  4. package/blueprints/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.ts +1 -1
  5. package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.ts +1 -1
  6. package/blueprints/component-test/index.js +2 -0
  7. package/blueprints/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.ts +2 -2
  8. package/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.ts +2 -2
  9. package/blueprints/controller-test/index.js +2 -0
  10. package/blueprints/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.ts +1 -1
  11. package/blueprints/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.ts +1 -1
  12. package/blueprints/helper-test/index.js +2 -3
  13. package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.ts +1 -1
  14. package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.ts +1 -1
  15. package/blueprints/route-test/index.js +2 -0
  16. package/blueprints/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.ts +1 -1
  17. package/blueprints/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.ts +1 -1
  18. package/blueprints/service-test/index.js +2 -0
  19. package/blueprints/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.ts +1 -1
  20. package/blueprints/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.ts +1 -1
  21. package/blueprints-js/-addon-import.js +48 -0
  22. package/blueprints-js/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +24 -0
  23. package/blueprints-js/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
  24. package/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +12 -0
  25. package/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
  26. package/blueprints-js/component/files/__root__/__path__/__name__.js +3 -0
  27. package/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs +1 -0
  28. package/blueprints-js/component-addon/files/__root__/__path__/__name__.js +1 -0
  29. package/blueprints-js/component-class/files/__root__/__path__/__name__.js +3 -0
  30. package/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js +1 -0
  31. package/blueprints-js/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +34 -0
  32. package/blueprints-js/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +36 -0
  33. package/blueprints-js/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +38 -0
  34. package/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +31 -0
  35. package/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +36 -0
  36. package/blueprints-js/controller/files/__root__/__path__/__name__.js +3 -0
  37. package/blueprints-js/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
  38. package/blueprints-js/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
  39. package/blueprints-js/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
  40. package/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
  41. package/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  42. package/blueprints-js/helper/files/__root__/__collection__/__name__.js +5 -0
  43. package/blueprints-js/helper/mu-files/__root__/__collection__/__name__.js +7 -0
  44. package/blueprints-js/helper-addon/files/__root__/__path__/__name__.js +1 -0
  45. package/blueprints-js/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +26 -0
  46. package/blueprints-js/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +28 -0
  47. package/blueprints-js/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +18 -0
  48. package/blueprints-js/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +15 -0
  49. package/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +17 -0
  50. package/blueprints-js/initializer/files/__root__/initializers/__name__.js +5 -0
  51. package/blueprints-js/initializer-addon/files/__root__/__path__/__name__.js +1 -0
  52. package/blueprints-js/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +28 -0
  53. package/blueprints-js/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +31 -0
  54. package/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +25 -0
  55. package/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +37 -0
  56. package/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js +5 -0
  57. package/blueprints-js/instance-initializer-addon/files/__root__/__path__/__name__.js +1 -0
  58. package/blueprints-js/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +30 -0
  59. package/blueprints-js/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +32 -0
  60. package/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +26 -0
  61. package/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +39 -0
  62. package/blueprints-js/mixin/files/__root__/mixins/__name__.js +3 -0
  63. package/blueprints-js/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +13 -0
  64. package/blueprints-js/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +13 -0
  65. package/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +12 -0
  66. package/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +12 -0
  67. package/blueprints-js/route/files/__root__/__path__/__name__.js +9 -0
  68. package/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs +2 -0
  69. package/blueprints-js/route-addon/files/__root__/__path__/__name__.js +1 -0
  70. package/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js +1 -0
  71. package/blueprints-js/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +15 -0
  72. package/blueprints-js/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +17 -0
  73. package/blueprints-js/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  74. package/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +11 -0
  75. package/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +11 -0
  76. package/blueprints-js/service/files/__root__/__path__/__name__.js +3 -0
  77. package/blueprints-js/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
  78. package/blueprints-js/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
  79. package/blueprints-js/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
  80. package/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
  81. package/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  82. package/blueprints-js/template/files/__root__/__path__/__name__.hbs +0 -0
  83. package/blueprints-js/test-framework-detector.js +60 -0
  84. package/blueprints-js/util/files/__root__/utils/__name__.js +3 -0
  85. package/blueprints-js/util-test/mocha-files/__root__/__testType__/__name__-test.js +11 -0
  86. package/blueprints-js/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +11 -0
  87. package/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js +10 -0
  88. package/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +10 -0
  89. package/build-metadata.json +3 -3
  90. package/dist/ember-template-compiler.js +2 -2
  91. package/dist/ember-template-compiler.map +1 -1
  92. package/dist/ember-testing.js +1 -1
  93. package/dist/ember-testing.map +1 -1
  94. package/dist/ember.debug.js +2 -2
  95. package/dist/ember.debug.map +1 -1
  96. package/dist/header/license.js +1 -1
  97. package/dist/packages/ember/version.js +1 -1
  98. package/docs/data.json +1 -1
  99. package/package.json +5 -7
@@ -0,0 +1,13 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupTest } from '<%= modulePrefix %>/tests/helpers';
4
+
5
+ describe('<%= friendlyTestDescription %>', function () {
6
+ setupTest();
7
+
8
+ // TODO: Replace this with your real tests.
9
+ it('exists', function () {
10
+ let controller = this.owner.lookup('controller:<%= controllerPathName %>');
11
+ expect(controller).to.be.ok;
12
+ });
13
+ });
@@ -0,0 +1,12 @@
1
+ import { moduleFor, test } from 'ember-qunit';
2
+
3
+ moduleFor('controller:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
4
+ // Specify the other units that are required for this test.
5
+ // needs: ['controller:foo']
6
+ });
7
+
8
+ // TODO: Replace this with your real tests.
9
+ test('it exists', function (assert) {
10
+ let controller = this.subject();
11
+ assert.ok(controller);
12
+ });
@@ -0,0 +1,12 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from '<%= modulePrefix %>/tests/helpers';
3
+
4
+ module('<%= friendlyTestDescription %>', function (hooks) {
5
+ setupTest(hooks);
6
+
7
+ // TODO: Replace this with your real tests.
8
+ test('it exists', function (assert) {
9
+ let controller = this.owner.lookup('controller:<%= controllerPathName %>');
10
+ assert.ok(controller);
11
+ });
12
+ });
@@ -0,0 +1,5 @@
1
+ import { helper } from '@ember/component/helper';
2
+
3
+ export default helper(function <%= camelizedModuleName %>(positional /*, named*/) {
4
+ return positional;
5
+ });
@@ -0,0 +1,7 @@
1
+ import { helper as buildHelper } from '@ember/component/helper';
2
+
3
+ export function <%= camelizedModuleName %>(positional /*, named*/) {
4
+ return positional;
5
+ }
6
+
7
+ export const helper = buildHelper(<%= camelizedModuleName %>);
@@ -0,0 +1 @@
1
+ export { default } from '<%= modulePath %>';
@@ -0,0 +1,26 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupComponentTest } from 'ember-mocha';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ describe('<%= friendlyTestName %>', function () {
7
+ setupComponentTest('<%= dasherizedModuleName %>', {
8
+ integration: true,
9
+ });
10
+
11
+ it('renders', function () {
12
+ // Set any properties with this.set('myProperty', 'value');
13
+ // Handle any actions with this.on('myAction', function(val) { ... });
14
+ // Template block usage:
15
+ // this.render(hbs`
16
+ // {{#<%= dasherizedModuleName %>}}
17
+ // template content
18
+ // {{/<%= dasherizedModuleName %>}}
19
+ // `);
20
+ this.set('inputValue', '1234');
21
+
22
+ this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
23
+
24
+ expect(this.$().text().trim()).to.equal('1234');
25
+ });
26
+ });
@@ -0,0 +1,28 @@
1
+ import { expect } from 'chai';
2
+ import { describeComponent, it } from 'ember-mocha';
3
+ import hbs from 'htmlbars-inline-precompile';
4
+
5
+ describeComponent(
6
+ '<%= dasherizedModuleName %>',
7
+ 'helper:<%= dasherizedModuleName %>',
8
+ {
9
+ integration: true,
10
+ },
11
+ function () {
12
+ it('renders', function () {
13
+ // Set any properties with this.set('myProperty', 'value');
14
+ // Handle any actions with this.on('myAction', function(val) { ... });
15
+ // Template block usage:
16
+ // this.render(hbs`
17
+ // {{#<%= dasherizedModuleName %>}}
18
+ // template content
19
+ // {{/<%= dasherizedModuleName %>}}
20
+ // `);
21
+ this.set('inputValue', '1234');
22
+
23
+ this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
24
+
25
+ expect(this.$().text().trim()).to.equal('1234');
26
+ });
27
+ }
28
+ );
@@ -0,0 +1,18 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers';
4
+ import { render } from '@ember/test-helpers';
5
+ <%= hbsImportStatement %>
6
+
7
+ describe('<%= friendlyTestName %>', function () {
8
+ setupRenderingTest();
9
+
10
+ // TODO: Replace this with your real tests.
11
+ it('renders', async function () {
12
+ this.set('inputValue', '1234');
13
+
14
+ await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
15
+
16
+ expect(this.element.textContent.trim()).to.equal('1234');
17
+ });
18
+ });
@@ -0,0 +1,15 @@
1
+ import { moduleForComponent, test } from 'ember-qunit';
2
+ import hbs from 'htmlbars-inline-precompile';
3
+
4
+ moduleForComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleName %>', {
5
+ integration: true,
6
+ });
7
+
8
+ // TODO: Replace this with your real tests.
9
+ test('it renders', function (assert) {
10
+ this.set('inputValue', '1234');
11
+
12
+ this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
13
+
14
+ assert.strictEqual(this.$().text().trim(), '1234');
15
+ });
@@ -0,0 +1,17 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers';
3
+ import { render } from '@ember/test-helpers';
4
+ <%= hbsImportStatement %>
5
+
6
+ module('<%= friendlyTestName %>', function (hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ // TODO: Replace this with your real tests.
10
+ test('it renders', async function (assert) {
11
+ this.set('inputValue', '1234');
12
+
13
+ await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
14
+
15
+ assert.dom(this.element).hasText('1234');
16
+ });
17
+ });
@@ -0,0 +1,5 @@
1
+ export function initialize(application) {}
2
+
3
+ export default {
4
+ initialize,
5
+ };
@@ -0,0 +1 @@
1
+ export { default, initialize } from '<%= modulePath %>';
@@ -0,0 +1,28 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it, beforeEach, afterEach } from 'mocha';
3
+ import { run } from '@ember/runloop';
4
+ import Application from '@ember/application';
5
+ import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
6
+ <% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';\n<% } %>
7
+ describe('<%= friendlyTestName %>', function () {
8
+ let application;
9
+
10
+ beforeEach(function () {
11
+ run(function () {
12
+ application = Application.create();
13
+ application.deferReadiness();
14
+ });
15
+ });
16
+
17
+ afterEach(function () {
18
+ <% if (destroyAppExists) { %>destroyApp(application);<% } else { %>run(application, 'destroy');<% } %>
19
+ });
20
+
21
+ // TODO: Replace this with your real tests.
22
+ it('works', function () {
23
+ initialize(application);
24
+
25
+ // you would normally confirm the results of the initializer here
26
+ expect(true).to.be.ok;
27
+ });
28
+ });
@@ -0,0 +1,31 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it, beforeEach, afterEach } from 'mocha';
3
+ import Application from '@ember/application';
4
+ import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
5
+ <% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
6
+
7
+ describe('<%= friendlyTestName %>', function () {
8
+ beforeEach(function () {
9
+ this.TestApplication = Application.extend();
10
+ this.TestApplication.initializer({
11
+ name: 'initializer under test',
12
+ initialize,
13
+ });
14
+
15
+ this.application = this.TestApplication.create({
16
+ autoboot: false,
17
+ });
18
+ });
19
+
20
+ afterEach(function () {
21
+ <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
22
+ });
23
+
24
+ // TODO: Replace this with your real tests.
25
+ it('works', async function () {
26
+ await this.application.boot();
27
+
28
+ // you would normally confirm the results of the initializer here
29
+ expect(true).to.be.ok;
30
+ });
31
+ });
@@ -0,0 +1,25 @@
1
+ import Application from '@ember/application';
2
+ import { run } from '@ember/runloop';
3
+
4
+ import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
5
+ import { module, test } from 'qunit';
6
+ <% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';\n<% } %>
7
+ module('<%= friendlyTestName %>', {
8
+ beforeEach() {
9
+ run(() => {
10
+ this.application = Application.create();
11
+ this.application.deferReadiness();
12
+ });
13
+ },
14
+ afterEach() {
15
+ <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
16
+ },
17
+ });
18
+
19
+ // TODO: Replace this with your real tests.
20
+ test('it works', function (assert) {
21
+ initialize(this.application);
22
+
23
+ // you would normally confirm the results of the initializer here
24
+ assert.ok(true);
25
+ });
@@ -0,0 +1,37 @@
1
+ import Application from '@ember/application';
2
+
3
+ import config from '<%= modulePrefix %>/config/environment';
4
+ import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
5
+ import { module, test } from 'qunit';
6
+ import Resolver from 'ember-resolver';
7
+ <% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
8
+
9
+ module('<%= friendlyTestName %>', function (hooks) {
10
+ hooks.beforeEach(function () {
11
+ this.TestApplication = class TestApplication extends Application {
12
+ modulePrefix = config.modulePrefix;
13
+ podModulePrefix = config.podModulePrefix;
14
+ Resolver = Resolver;
15
+ };
16
+
17
+ this.TestApplication.initializer({
18
+ name: 'initializer under test',
19
+ initialize,
20
+ });
21
+
22
+ this.application = this.TestApplication.create({
23
+ autoboot: false,
24
+ });
25
+ });
26
+
27
+ hooks.afterEach(function () {
28
+ <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
29
+ });
30
+
31
+ // TODO: Replace this with your real tests.
32
+ test('it works', async function (assert) {
33
+ await this.application.boot();
34
+
35
+ assert.ok(true);
36
+ });
37
+ });
@@ -0,0 +1,5 @@
1
+ export function initialize(owner) {}
2
+
3
+ export default {
4
+ initialize,
5
+ };
@@ -0,0 +1 @@
1
+ export { default, initialize } from '<%= modulePath %>';
@@ -0,0 +1,30 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it, afterEach, beforeEach } from 'mocha';
3
+ import Application from '@ember/application';
4
+ import { run } from '@ember/runloop';
5
+ import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
6
+ import destroyApp from '../../helpers/destroy-app';
7
+
8
+ describe('<%= friendlyTestName %>', function () {
9
+ let application, appInstance;
10
+
11
+ beforeEach(function () {
12
+ run(function () {
13
+ application = Application.create();
14
+ appInstance = application.buildInstance();
15
+ });
16
+ });
17
+
18
+ afterEach(function () {
19
+ run(appInstance, 'destroy');
20
+ destroyApp(application);
21
+ });
22
+
23
+ // TODO: Replace this with your real tests.
24
+ it('works', function () {
25
+ initialize(appInstance);
26
+
27
+ // you would normally confirm the results of the initializer here
28
+ expect(true).to.be.ok;
29
+ });
30
+ });
@@ -0,0 +1,32 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it, beforeEach, afterEach } from 'mocha';
3
+ import Application from '@ember/application';
4
+ import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
5
+ <% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
6
+
7
+ describe('<%= friendlyTestName %>', function () {
8
+ beforeEach(function () {
9
+ this.TestApplication = Application.extend();
10
+ this.TestApplication.instanceInitializer({
11
+ name: 'initializer under test',
12
+ initialize,
13
+ });
14
+
15
+ this.application = this.TestApplication.create({
16
+ autoboot: false,
17
+ });
18
+
19
+ this.instance = this.application.buildInstance();
20
+ });
21
+ afterEach(function () {
22
+ <% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>
23
+ <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
24
+ });
25
+
26
+ // TODO: Replace this with your real tests.
27
+ it('works', async function () {
28
+ await this.instance.boot();
29
+
30
+ expect(true).to.be.ok;
31
+ });
32
+ });
@@ -0,0 +1,26 @@
1
+ import Application from '@ember/application';
2
+ import { run } from '@ember/runloop';
3
+ import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
4
+ import { module, test } from 'qunit';<% if (destroyAppExists) { %>
5
+ import destroyApp from '../../helpers/destroy-app';<% } %>
6
+
7
+ module('<%= friendlyTestName %>', {
8
+ beforeEach() {
9
+ run(() => {
10
+ this.application = Application.create();
11
+ this.appInstance = this.application.buildInstance();
12
+ });
13
+ },
14
+ afterEach() {
15
+ run(this.appInstance, 'destroy');
16
+ <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
17
+ },
18
+ });
19
+
20
+ // TODO: Replace this with your real tests.
21
+ test('it works', function (assert) {
22
+ initialize(this.appInstance);
23
+
24
+ // you would normally confirm the results of the initializer here
25
+ assert.ok(true);
26
+ });
@@ -0,0 +1,39 @@
1
+ import Application from '@ember/application';
2
+
3
+ import config from '<%= modulePrefix %>/config/environment';
4
+ import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
5
+ import { module, test } from 'qunit';
6
+ import Resolver from 'ember-resolver';
7
+ <% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
8
+
9
+ module('<%= friendlyTestName %>', function (hooks) {
10
+ hooks.beforeEach(function () {
11
+ this.TestApplication = class TestApplication extends Application {
12
+ modulePrefix = config.modulePrefix;
13
+ podModulePrefix = config.podModulePrefix;
14
+ Resolver = Resolver;
15
+ };
16
+
17
+ this.TestApplication.instanceInitializer({
18
+ name: 'initializer under test',
19
+ initialize,
20
+ });
21
+
22
+ this.application = this.TestApplication.create({
23
+ autoboot: false,
24
+ });
25
+
26
+ this.instance = this.application.buildInstance();
27
+ });
28
+ hooks.afterEach(function () {
29
+ <% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>
30
+ <% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
31
+ });
32
+
33
+ // TODO: Replace this with your real tests.
34
+ test('it works', async function (assert) {
35
+ await this.instance.boot();
36
+
37
+ assert.ok(true);
38
+ });
39
+ });
@@ -0,0 +1,3 @@
1
+ import Mixin from '@ember/object/mixin';
2
+
3
+ export default Mixin.create({});
@@ -0,0 +1,13 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import EmberObject from '@ember/object';
4
+ import <%= classifiedModuleName %>Mixin from '<%= dasherizedPackageName %>/mixins/<%= dasherizedModuleName %>';
5
+
6
+ describe('<%= friendlyTestName %>', function () {
7
+ // TODO: Replace this with your real tests.
8
+ it('works', function () {
9
+ let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin);
10
+ let subject = <%= classifiedModuleName %>Object.create();
11
+ expect(subject).to.be.ok;
12
+ });
13
+ });
@@ -0,0 +1,13 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import EmberObject from '@ember/object';
4
+ import <%= classifiedModuleName %>Mixin from '<%= dasherizedPackageName %>/mixins/<%= dasherizedModuleName %>';
5
+
6
+ describe('<%= friendlyTestName %>', function () {
7
+ // TODO: Replace this with your real tests.
8
+ it('works', function () {
9
+ let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin);
10
+ let subject = <%= classifiedModuleName %>Object.create();
11
+ expect(subject).to.be.ok;
12
+ });
13
+ });
@@ -0,0 +1,12 @@
1
+ import EmberObject from '@ember/object';
2
+ import <%= classifiedModuleName %>Mixin from '<%= projectName %>/mixins/<%= dasherizedModuleName %>';
3
+ import { module, test } from 'qunit';
4
+
5
+ module('<%= friendlyTestName %>');
6
+
7
+ // TODO: Replace this with your real tests.
8
+ test('it works', function (assert) {
9
+ let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin);
10
+ let subject = <%= classifiedModuleName %>Object.create();
11
+ assert.ok(subject);
12
+ });
@@ -0,0 +1,12 @@
1
+ import EmberObject from '@ember/object';
2
+ import <%= classifiedModuleName %>Mixin from '<%= projectName %>/mixins/<%= dasherizedModuleName %>';
3
+ import { module, test } from 'qunit';
4
+
5
+ module('<%= friendlyTestName %>', function () {
6
+ // TODO: Replace this with your real tests.
7
+ test('it works', function (assert) {
8
+ let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin);
9
+ let subject = <%= classifiedModuleName %>Object.create();
10
+ assert.ok(subject);
11
+ });
12
+ });
@@ -0,0 +1,9 @@
1
+ import Route from '@ember/routing/route';
2
+
3
+ export default class <%= classifiedModuleName %>Route extends Route {<% if (hasDynamicSegment) {%>
4
+ model(params) {
5
+ // This route was generated with a dynamic segment. Implement data loading
6
+ // based on that dynamic segment here in the model hook.
7
+ return params;
8
+ }
9
+ <%}%>}
@@ -0,0 +1,2 @@
1
+ <% if (addTitle) {%>{{page-title "<%= routeName %>"}}
2
+ <%}%>{{outlet}}
@@ -0,0 +1 @@
1
+ export { default } from '<%= routeModulePath %>';
@@ -0,0 +1 @@
1
+ export { default } from '<%= templateModulePath %>';
@@ -0,0 +1,15 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupTest } from 'ember-mocha';
4
+
5
+ describe('<%= friendlyTestDescription %>', function () {
6
+ setupTest('route:<%= moduleName %>', {
7
+ // Specify the other units that are required for this test.
8
+ // needs: ['controller:foo']
9
+ });
10
+
11
+ it('exists', function () {
12
+ let route = this.subject();
13
+ expect(route).to.be.ok;
14
+ });
15
+ });
@@ -0,0 +1,17 @@
1
+ import { expect } from 'chai';
2
+ import { describeModule, it } from 'ember-mocha';
3
+
4
+ describeModule(
5
+ 'route:<%= moduleName %>',
6
+ '<%= friendlyTestDescription %>',
7
+ {
8
+ // Specify the other units that are required for this test.
9
+ // needs: ['controller:foo']
10
+ },
11
+ function () {
12
+ it('exists', function () {
13
+ let route = this.subject();
14
+ expect(route).to.be.ok;
15
+ });
16
+ }
17
+ );
@@ -0,0 +1,12 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupTest } from '<%= modulePrefix %>/tests/helpers';
4
+
5
+ describe('<%= friendlyTestDescription %>', function () {
6
+ setupTest();
7
+
8
+ it('exists', function () {
9
+ let route = this.owner.lookup('route:<%= dasherizedModuleName %>');
10
+ expect(route).to.be.ok;
11
+ });
12
+ });
@@ -0,0 +1,11 @@
1
+ import { moduleFor, test } from 'ember-qunit';
2
+
3
+ moduleFor('route:<%= moduleName %>', '<%= friendlyTestDescription %>', {
4
+ // Specify the other units that are required for this test.
5
+ // needs: ['controller:foo']
6
+ });
7
+
8
+ test('it exists', function (assert) {
9
+ let route = this.subject();
10
+ assert.ok(route);
11
+ });
@@ -0,0 +1,11 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from '<%= modulePrefix %>/tests/helpers';
3
+
4
+ module('<%= friendlyTestDescription %>', function (hooks) {
5
+ setupTest(hooks);
6
+
7
+ test('it exists', function (assert) {
8
+ let route = this.owner.lookup('route:<%= moduleName %>');
9
+ assert.ok(route);
10
+ });
11
+ });
@@ -0,0 +1,3 @@
1
+ import Service from '@ember/service';
2
+
3
+ export default class <%= classifiedModuleName %>Service extends Service {}
@@ -0,0 +1,16 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupTest } from 'ember-mocha';
4
+
5
+ describe('<%= friendlyTestDescription %>', function () {
6
+ setupTest('service:<%= dasherizedModuleName %>', {
7
+ // Specify the other units that are required for this test.
8
+ // needs: ['service:foo']
9
+ });
10
+
11
+ // TODO: Replace this with your real tests.
12
+ it('exists', function () {
13
+ let service = this.subject();
14
+ expect(service).to.be.ok;
15
+ });
16
+ });
@@ -0,0 +1,18 @@
1
+ import { expect } from 'chai';
2
+ import { describeModule, it } from 'ember-mocha';
3
+
4
+ describeModule(
5
+ 'service:<%= dasherizedModuleName %>',
6
+ '<%= friendlyTestDescription %>',
7
+ {
8
+ // Specify the other units that are required for this test.
9
+ // needs: ['service:foo']
10
+ },
11
+ function () {
12
+ // TODO: Replace this with your real tests.
13
+ it('exists', function () {
14
+ let service = this.subject();
15
+ expect(service).to.be.ok;
16
+ });
17
+ }
18
+ );