ember-source 4.4.0 → 4.4.1

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 (80) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/blueprints-js/-addon-import.js +48 -0
  3. package/blueprints-js/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +24 -0
  4. package/blueprints-js/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
  5. package/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +12 -0
  6. package/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
  7. package/blueprints-js/component/files/__root__/__path__/__name__.js +3 -0
  8. package/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs +1 -0
  9. package/blueprints-js/component-addon/files/__root__/__path__/__name__.js +1 -0
  10. package/blueprints-js/component-class/files/__root__/__path__/__name__.js +3 -0
  11. package/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js +1 -0
  12. package/blueprints-js/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +34 -0
  13. package/blueprints-js/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +36 -0
  14. package/blueprints-js/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +38 -0
  15. package/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +31 -0
  16. package/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +36 -0
  17. package/blueprints-js/controller/files/__root__/__path__/__name__.js +3 -0
  18. package/blueprints-js/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
  19. package/blueprints-js/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
  20. package/blueprints-js/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
  21. package/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
  22. package/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  23. package/blueprints-js/helper/files/__root__/__collection__/__name__.js +5 -0
  24. package/blueprints-js/helper/mu-files/__root__/__collection__/__name__.js +7 -0
  25. package/blueprints-js/helper-addon/files/__root__/__path__/__name__.js +1 -0
  26. package/blueprints-js/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +26 -0
  27. package/blueprints-js/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +28 -0
  28. package/blueprints-js/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +18 -0
  29. package/blueprints-js/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +15 -0
  30. package/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +17 -0
  31. package/blueprints-js/initializer/files/__root__/initializers/__name__.js +5 -0
  32. package/blueprints-js/initializer-addon/files/__root__/__path__/__name__.js +1 -0
  33. package/blueprints-js/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +28 -0
  34. package/blueprints-js/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +31 -0
  35. package/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +25 -0
  36. package/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +37 -0
  37. package/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js +5 -0
  38. package/blueprints-js/instance-initializer-addon/files/__root__/__path__/__name__.js +1 -0
  39. package/blueprints-js/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +30 -0
  40. package/blueprints-js/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +32 -0
  41. package/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +26 -0
  42. package/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +39 -0
  43. package/blueprints-js/mixin/files/__root__/mixins/__name__.js +3 -0
  44. package/blueprints-js/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +13 -0
  45. package/blueprints-js/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +13 -0
  46. package/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +12 -0
  47. package/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +12 -0
  48. package/blueprints-js/route/files/__root__/__path__/__name__.js +9 -0
  49. package/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs +2 -0
  50. package/blueprints-js/route-addon/files/__root__/__path__/__name__.js +1 -0
  51. package/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js +1 -0
  52. package/blueprints-js/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +15 -0
  53. package/blueprints-js/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +17 -0
  54. package/blueprints-js/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  55. package/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +11 -0
  56. package/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +11 -0
  57. package/blueprints-js/service/files/__root__/__path__/__name__.js +3 -0
  58. package/blueprints-js/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
  59. package/blueprints-js/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
  60. package/blueprints-js/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
  61. package/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
  62. package/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  63. package/blueprints-js/template/files/__root__/__path__/__name__.hbs +0 -0
  64. package/blueprints-js/test-framework-detector.js +60 -0
  65. package/blueprints-js/util/files/__root__/utils/__name__.js +3 -0
  66. package/blueprints-js/util-test/mocha-files/__root__/__testType__/__name__-test.js +11 -0
  67. package/blueprints-js/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +11 -0
  68. package/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js +10 -0
  69. package/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +10 -0
  70. package/build-metadata.json +3 -3
  71. package/dist/ember-template-compiler.js +2 -2
  72. package/dist/ember-template-compiler.map +1 -1
  73. package/dist/ember-testing.js +1 -1
  74. package/dist/ember-testing.map +1 -1
  75. package/dist/ember.debug.js +2 -2
  76. package/dist/ember.debug.map +1 -1
  77. package/dist/header/license.js +1 -1
  78. package/dist/packages/ember/version.js +1 -1
  79. package/docs/data.json +1 -1
  80. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- # Ember Changelo
1
+ # Ember Changelog
2
+
3
+ ### v4.4.1 (May 31, 2022)
4
+
5
+ - [#20082](https://github.com/emberjs/ember.js/pull/20082) [BUGFIX] Fix blueprints publication
2
6
 
3
7
  ### v4.4.0 (May 2, 2022)
4
8
 
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ const stringUtil = require('ember-cli-string-utils');
4
+ const path = require('path');
5
+ const inflector = require('inflection');
6
+
7
+ module.exports = {
8
+ description: 'Generates an import wrapper.',
9
+
10
+ fileMapTokens: function () {
11
+ return {
12
+ __name__: function (options) {
13
+ return options.dasherizedModuleName;
14
+ },
15
+ __path__: function (options) {
16
+ return inflector.pluralize(options.locals.blueprintName);
17
+ },
18
+ __root__: function (options) {
19
+ if (options.inRepoAddon) {
20
+ return path.join('lib', options.inRepoAddon, 'app');
21
+ }
22
+ return 'app';
23
+ },
24
+ };
25
+ },
26
+
27
+ locals: function (options) {
28
+ let addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name();
29
+ let addonName = stringUtil.dasherize(addonRawName);
30
+ let fileName = stringUtil.dasherize(options.entity.name);
31
+ let blueprintName = options.originBlueprintName;
32
+ let modulePathSegments = [
33
+ addonName,
34
+ inflector.pluralize(options.originBlueprintName),
35
+ fileName,
36
+ ];
37
+
38
+ if (blueprintName.match(/-addon/)) {
39
+ blueprintName = blueprintName.substr(0, blueprintName.indexOf('-addon'));
40
+ modulePathSegments = [addonName, inflector.pluralize(blueprintName), fileName];
41
+ }
42
+
43
+ return {
44
+ modulePath: modulePathSegments.join('/'),
45
+ blueprintName: blueprintName,
46
+ };
47
+ },
48
+ };
@@ -0,0 +1,24 @@
1
+ import { describe, it, beforeEach, afterEach } from 'mocha';
2
+ import { expect } from 'chai';
3
+ import startApp from '<%= dasherizedPackageName %>/tests/helpers/start-app';
4
+ <% if (destroyAppExists) { %>import destroyApp from '<%= dasherizedPackageName %>/tests/helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
5
+
6
+ describe('<%= friendlyTestName %>', function () {
7
+ let application;
8
+
9
+ beforeEach(function () {
10
+ application = startApp();
11
+ });
12
+
13
+ afterEach(function () {
14
+ <% if (destroyAppExists) { %>destroyApp(application);<% } else { %>run(application, 'destroy');<% } %>
15
+ });
16
+
17
+ it('can visit /<%= dasherizedModuleName %>', function () {
18
+ visit('/<%= dasherizedModuleName %>');
19
+
20
+ return andThen(() => {
21
+ expect(currentURL()).to.equal('/<%= dasherizedModuleName %>');
22
+ });
23
+ });
24
+ });
@@ -0,0 +1,13 @@
1
+ import { describe, it } from 'mocha';
2
+ import { expect } from 'chai';
3
+ import { setupApplicationTest } from '<%= dasherizedPackageName %>/tests/helpers';
4
+ import { visit, currentURL } from '@ember/test-helpers';
5
+
6
+ describe('<%= friendlyTestName %>', function () {
7
+ setupApplicationTest();
8
+
9
+ it('can visit /<%= dasherizedModuleName %>', async function () {
10
+ await visit('/<%= dasherizedModuleName %>');
11
+ expect(currentURL()).to.equal('/<%= dasherizedModuleName %>');
12
+ });
13
+ });
@@ -0,0 +1,12 @@
1
+ import { test } from 'qunit';
2
+ import moduleForAcceptance from '<%= testFolderRoot %>/tests/helpers/module-for-acceptance';
3
+
4
+ moduleForAcceptance('<%= friendlyTestName %>');
5
+
6
+ test('visiting /<%= dasherizedModuleName %>', function (assert) {
7
+ visit('/<%= dasherizedModuleName %>');
8
+
9
+ andThen(function () {
10
+ assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>');
11
+ });
12
+ });
@@ -0,0 +1,13 @@
1
+ import { module, test } from 'qunit';
2
+ import { visit, currentURL } from '@ember/test-helpers';
3
+ import { setupApplicationTest } from '<%= dasherizedPackageName %>/tests/helpers';
4
+
5
+ module('<%= friendlyTestName %>', function (hooks) {
6
+ setupApplicationTest(hooks);
7
+
8
+ test('visiting /<%= dasherizedModuleName %>', async function (assert) {
9
+ await visit('/<%= dasherizedModuleName %>');
10
+
11
+ assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>');
12
+ });
13
+ });
@@ -0,0 +1,3 @@
1
+ <%= importComponent %>
2
+ <%= importTemplate %>
3
+ export default <%= defaultExport %>
@@ -0,0 +1 @@
1
+ export { default } from '<%= modulePath %>';
@@ -0,0 +1,3 @@
1
+ <%= importComponent %>
2
+ <%= importTemplate %>
3
+ export default <%= defaultExport %>
@@ -0,0 +1 @@
1
+ export { default } from '<%= modulePath %>';
@@ -0,0 +1,34 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupComponentTest } from 'ember-mocha';<% if (testType === 'integration') { %>
4
+ import hbs from 'htmlbars-inline-precompile';<% } %>
5
+
6
+ describe('<%= friendlyTestDescription %>', function () {
7
+ setupComponentTest('<%= componentPathName %>', {
8
+ <% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
9
+ // needs: ['component:foo', 'helper:bar'],
10
+ unit: true,<% } %>
11
+ });
12
+
13
+ it('renders', function () {
14
+ <% if (testType === 'integration' ) { %>// Set any properties with this.set('myProperty', 'value');
15
+ // Handle any actions with this.on('myAction', function(val) { ... });
16
+
17
+ this.render(hbs`<%= selfCloseComponent(componentName) %>`);
18
+ expect(this.$()).to.have.length(1);
19
+
20
+ // Template block usage:
21
+ this.render(hbs`
22
+ <%= openComponent(componentName) %>
23
+ template block text
24
+ <%= closeComponent(componentName) %>
25
+ `);
26
+
27
+ expect(this.$().text().trim()).to.equal('template block text');<% } else if(testType === 'unit') { %>// creates the component instance
28
+ let component = this.subject();
29
+ // renders the component on the page
30
+ this.render();
31
+ expect(component).to.be.ok;
32
+ expect(this.$()).to.have.length(1);<% } %>
33
+ });
34
+ });
@@ -0,0 +1,36 @@
1
+ import { expect } from 'chai';
2
+ import { describeComponent, it } from 'ember-mocha';<% if (testType === 'integration') { %>
3
+ import hbs from 'htmlbars-inline-precompile';<% } %>
4
+
5
+ describeComponent(
6
+ '<%= componentPathName %>',
7
+ '<%= friendlyTestDescription %>',
8
+ {
9
+ <% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
10
+ // needs: ['component:foo', 'helper:bar'],
11
+ unit: true,<% } %>
12
+ },
13
+ function () {
14
+ it('renders', function () {
15
+ <% if (testType === 'integration' ) { %>// Set any properties with this.set('myProperty', 'value');
16
+ // Handle any actions with this.on('myAction', function(val) { ... });
17
+
18
+ this.render(hbs`<%= selfCloseComponent(componentName) %>`);
19
+ expect(this.$()).to.have.length(1);
20
+
21
+ // Template block usage:
22
+ this.render(hbs`
23
+ <%= openComponent(componentName) %>
24
+ template block text
25
+ <%= closeComponent(componentName) %>
26
+ `);
27
+
28
+ expect(this.$().text().trim()).to.equal('template block text');<% } else if(testType === 'unit') { %>// creates the component instance
29
+ let component = this.subject();
30
+ // renders the component on the page
31
+ this.render();
32
+ expect(component).to.be.ok;
33
+ expect(this.$()).to.have.length(1);<% } %>
34
+ });
35
+ }
36
+ );
@@ -0,0 +1,38 @@
1
+ <% if (testType === 'integration') { %>import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupRenderingTest } from '<%= dasherizedPackageName %>/tests/helpers';
4
+ import { render } from '@ember/test-helpers';
5
+ <%= hbsImportStatement %>
6
+
7
+ describe('<%= friendlyTestDescription %>', function () {
8
+ setupRenderingTest();
9
+
10
+ it('renders', async function () {
11
+ // Set any properties with this.set('myProperty', 'value');
12
+ // Handle any actions with this.set('myAction', function(val) { ... });
13
+
14
+ await render(hbs`<%= selfCloseComponent(componentName) %>`);
15
+
16
+ expect(this.element.textContent.trim()).to.equal('');
17
+
18
+ // Template block usage:
19
+ await render(hbs`
20
+ <%= openComponent(componentName) %>
21
+ template block text
22
+ <%= closeComponent(componentName) %>
23
+ `);
24
+
25
+ expect(this.element.textContent.trim()).to.equal('template block text');
26
+ });
27
+ });<% } else if (testType === 'unit') { %>import { expect } from 'chai';
28
+ import { describe, it } from 'mocha';
29
+ import { setupTest } from '<%= dasherizedPackageName %>/tests/helpers';
30
+
31
+ describe('<%= friendlyTestDescription %>', function () {
32
+ setupTest();
33
+
34
+ it('exists', function () {
35
+ let component = this.owner.factoryFor('component:<%= componentPathName %>').create();
36
+ expect(component).to.be.ok;
37
+ });
38
+ });<% } %>
@@ -0,0 +1,31 @@
1
+ import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %>
2
+ import hbs from 'htmlbars-inline-precompile';<% } %>
3
+
4
+ moduleForComponent('<%= componentPathName %>', '<%= friendlyTestDescription %>', {
5
+ <% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
6
+ // needs: ['component:foo', 'helper:bar'],
7
+ unit: true,<% } %>
8
+ });
9
+
10
+ test('it renders', function (assert) {<% if (testType === 'integration' ) { %>
11
+ // Set any properties with this.set('myProperty', 'value');
12
+ // Handle any actions with this.on('myAction', function(val) { ... });
13
+
14
+ this.render(hbs`<%= selfCloseComponent(componentName) %>`);
15
+
16
+ assert.strictEqual(this.$().text().trim(), '');
17
+
18
+ // Template block usage:
19
+ this.render(hbs`
20
+ <%= openComponent(componentName) %>
21
+ template block text
22
+ <%= closeComponent(componentName) %>
23
+ `);
24
+
25
+ assert.strictEqual(this.$().text().trim(), 'template block text');<% } else if(testType === 'unit') { %>
26
+ // Creates the component instance
27
+ /*let component =*/ this.subject();
28
+ // Renders the component to the page
29
+ this.render();
30
+ assert.strictEqual(this.$().text().trim(), '');<% } %>
31
+ });
@@ -0,0 +1,36 @@
1
+ <% if (testType === 'integration') { %>import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from '<%= dasherizedPackageName %>/tests/helpers';
3
+ import { render } from '@ember/test-helpers';
4
+ <%= hbsImportStatement %>
5
+
6
+ module('<%= friendlyTestDescription %>', function (hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function (assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`<%= selfCloseComponent(componentName) %>`);
14
+
15
+ assert.dom(this.element).hasText('');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ <%= openComponent(componentName) %>
20
+ template block text
21
+ <%= closeComponent(componentName) %>
22
+ `);
23
+
24
+ assert.dom(this.element).hasText('template block text');
25
+ });
26
+ });<% } else if (testType === 'unit') { %>import { module, test } from 'qunit';
27
+ import { setupTest } from '<%= dasherizedPackageName %>/tests/helpers';
28
+
29
+ module('<%= friendlyTestDescription %>', function (hooks) {
30
+ setupTest(hooks);
31
+
32
+ test('it exists', function (assert) {
33
+ let component = this.owner.factoryFor('component:<%= componentPathName %>').create();
34
+ assert.ok(component);
35
+ });
36
+ });<% } %>
@@ -0,0 +1,3 @@
1
+ import Controller from '@ember/controller';
2
+
3
+ export default class <%= classifiedModuleName %>Controller extends Controller {}
@@ -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('controller:<%= dasherizedModuleName %>', {
7
+ // Specify the other units that are required for this test.
8
+ // needs: ['controller:foo']
9
+ });
10
+
11
+ // TODO: Replace this with your real tests.
12
+ it('exists', function () {
13
+ let controller = this.subject();
14
+ expect(controller).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
+ 'controller:<%= dasherizedModuleName %>',
6
+ '<%= friendlyTestDescription %>',
7
+ {
8
+ // Specify the other units that are required for this test.
9
+ // needs: ['controller:foo']
10
+ },
11
+ function () {
12
+ // TODO: Replace this with your real tests.
13
+ it('exists', function () {
14
+ let controller = this.subject();
15
+ expect(controller).to.be.ok;
16
+ });
17
+ }
18
+ );
@@ -0,0 +1,13 @@
1
+ import { expect } from 'chai';
2
+ import { describe, it } from 'mocha';
3
+ import { setupTest } from '<%= dasherizedPackageName %>/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 '<%= dasherizedPackageName %>/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 '<%= dasherizedPackageName %>/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 '<%= dasherizedPackageName %>/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
+ });