ember-source 4.3.0-alpha.3 → 4.4.0-alpha.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.
- package/CHANGELOG.md +6 -2
- package/blueprints/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +4 -4
- package/blueprints/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/component/index.js +2 -2
- package/blueprints/component-class/index.js +2 -2
- package/blueprints/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +7 -5
- package/blueprints/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/controller/files/__root__/__path__/__name__.js +1 -2
- package/blueprints/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/helper/files/__root__/__collection__/__name__.js +1 -1
- package/blueprints/helper/mu-files/__root__/__collection__/__name__.js +1 -1
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +3 -3
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +6 -4
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/initializer/files/__root__/initializers/__name__.js +2 -3
- package/blueprints/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +6 -7
- package/blueprints/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +3 -4
- package/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js +2 -3
- package/blueprints/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +2 -2
- package/blueprints/mixin/files/__root__/mixins/__name__.js +1 -2
- package/blueprints/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/route/files/__root__/__path__/__name__.js +2 -2
- package/blueprints/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service/files/__root__/__path__/__name__.js +1 -2
- package/blueprints/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/util-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/util-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +2 -3
- package/build-metadata.json +3 -3
- package/dist/dependencies/router_js.js +67 -32
- package/dist/ember-template-compiler.js +1168 -908
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +76 -43
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +3206 -2734
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +18 -13
- package/dist/packages/@ember/-internals/glimmer/index.js +128 -67
- package/dist/packages/@ember/-internals/meta/lib/meta.js +8 -9
- package/dist/packages/@ember/-internals/metal/index.js +58 -61
- package/dist/packages/@ember/-internals/routing/lib/ext/controller.js +10 -8
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +155 -191
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +2 -0
- package/dist/packages/@ember/-internals/routing/lib/system/generate_controller.js +3 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route-info.js +2 -2
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +108 -380
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +65 -46
- package/dist/packages/@ember/-internals/routing/lib/utils.js +33 -21
- package/dist/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +32 -32
- package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +29 -29
- package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +51 -50
- package/dist/packages/@ember/-internals/utils/index.js +3 -1
- package/dist/packages/@ember/-internals/views/lib/system/utils.js +1 -0
- package/dist/packages/@ember/application/instance.js +3 -3
- package/dist/packages/@ember/canary-features/index.js +0 -10
- package/dist/packages/@ember/controller/index.js +3 -54
- package/dist/packages/@ember/debug/lib/capture-render-tree.js +2 -0
- package/dist/packages/@ember/instrumentation/index.js +9 -13
- package/dist/packages/@ember/routing/router-service.js +1 -0
- package/dist/packages/@ember/service/index.js +6 -73
- package/dist/packages/ember/index.js +3 -14
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +556 -504
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Ember Changelog
|
|
2
2
|
|
|
3
|
-
### v4.
|
|
3
|
+
### v4.3.0-beta.1 (February 7, 2022)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No public API changes or bugfixes.
|
|
6
|
+
|
|
7
|
+
### v4.2.0 (February 7, 2022)
|
|
8
|
+
|
|
9
|
+
- [#19878](https://github.com/emberjs/ember.js/pull/19878) [BUGFIX] Allow class-based helpers to work in strict-mode.
|
|
6
10
|
|
|
7
11
|
### v4.1.0 (December 28, 2021)
|
|
8
12
|
|
|
@@ -3,18 +3,18 @@ import { expect } from 'chai';
|
|
|
3
3
|
import startApp from '<%= dasherizedPackageName %>/tests/helpers/start-app';
|
|
4
4
|
<% if (destroyAppExists) { %>import destroyApp from '<%= dasherizedPackageName %>/tests/helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
|
|
5
5
|
|
|
6
|
-
describe('<%= friendlyTestName %>', function() {
|
|
6
|
+
describe('<%= friendlyTestName %>', function () {
|
|
7
7
|
let application;
|
|
8
8
|
|
|
9
|
-
beforeEach(function() {
|
|
9
|
+
beforeEach(function () {
|
|
10
10
|
application = startApp();
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
afterEach(function() {
|
|
13
|
+
afterEach(function () {
|
|
14
14
|
<% if (destroyAppExists) { %>destroyApp(application);<% } else { %>run(application, 'destroy');<% } %>
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
it('can visit /<%= dasherizedModuleName %>', function() {
|
|
17
|
+
it('can visit /<%= dasherizedModuleName %>', function () {
|
|
18
18
|
visit('/<%= dasherizedModuleName %>');
|
|
19
19
|
|
|
20
20
|
return andThen(() => {
|
|
@@ -3,10 +3,10 @@ import { expect } from 'chai';
|
|
|
3
3
|
import { setupApplicationTest } from 'ember-mocha';
|
|
4
4
|
import { visit, currentURL } from '@ember/test-helpers';
|
|
5
5
|
|
|
6
|
-
describe('<%= friendlyTestName %>', function() {
|
|
6
|
+
describe('<%= friendlyTestName %>', function () {
|
|
7
7
|
setupApplicationTest();
|
|
8
8
|
|
|
9
|
-
it('can visit /<%= dasherizedModuleName %>', async function() {
|
|
9
|
+
it('can visit /<%= dasherizedModuleName %>', async function () {
|
|
10
10
|
await visit('/<%= dasherizedModuleName %>');
|
|
11
11
|
expect(currentURL()).to.equal('/<%= dasherizedModuleName %>');
|
|
12
12
|
});
|
|
@@ -3,10 +3,10 @@ import moduleForAcceptance from '<%= testFolderRoot %>/tests/helpers/module-for-
|
|
|
3
3
|
|
|
4
4
|
moduleForAcceptance('<%= friendlyTestName %>');
|
|
5
5
|
|
|
6
|
-
test('visiting /<%= dasherizedModuleName %>', function(assert) {
|
|
6
|
+
test('visiting /<%= dasherizedModuleName %>', function (assert) {
|
|
7
7
|
visit('/<%= dasherizedModuleName %>');
|
|
8
8
|
|
|
9
|
-
andThen(function() {
|
|
9
|
+
andThen(function () {
|
|
10
10
|
assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>');
|
|
11
11
|
});
|
|
12
12
|
});
|
|
@@ -2,10 +2,10 @@ import { module, test } from 'qunit';
|
|
|
2
2
|
import { visit, currentURL } from '@ember/test-helpers';
|
|
3
3
|
import { setupApplicationTest } from 'ember-qunit';
|
|
4
4
|
|
|
5
|
-
module('<%= friendlyTestName %>', function(hooks) {
|
|
5
|
+
module('<%= friendlyTestName %>', function (hooks) {
|
|
6
6
|
setupApplicationTest(hooks);
|
|
7
7
|
|
|
8
|
-
test('visiting /<%= dasherizedModuleName %>', async function(assert) {
|
|
8
|
+
test('visiting /<%= dasherizedModuleName %>', async function (assert) {
|
|
9
9
|
await visit('/<%= dasherizedModuleName %>');
|
|
10
10
|
|
|
11
11
|
assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>');
|
|
@@ -253,12 +253,12 @@ module.exports = {
|
|
|
253
253
|
importTemplate = `import layout from '${templatePath}';${EOL}`;
|
|
254
254
|
defaultExport = `Component.extend({${EOL} layout${EOL}});`;
|
|
255
255
|
} else {
|
|
256
|
-
defaultExport = `Component.extend({
|
|
256
|
+
defaultExport = `Component.extend({});`;
|
|
257
257
|
}
|
|
258
258
|
break;
|
|
259
259
|
case '@glimmer/component':
|
|
260
260
|
importComponent = `import Component from '@glimmer/component';`;
|
|
261
|
-
defaultExport = `class ${classifiedModuleName}Component extends Component {
|
|
261
|
+
defaultExport = `class ${classifiedModuleName}Component extends Component {}`;
|
|
262
262
|
break;
|
|
263
263
|
case '@ember/component/template-only':
|
|
264
264
|
importComponent = `import templateOnly from '@ember/component/template-only';`;
|
|
@@ -151,12 +151,12 @@ module.exports = {
|
|
|
151
151
|
importTemplate = `import layout from '${templatePath}';${EOL}`;
|
|
152
152
|
defaultExport = `Component.extend({${EOL} layout${EOL}});`;
|
|
153
153
|
} else {
|
|
154
|
-
defaultExport = `Component.extend({
|
|
154
|
+
defaultExport = `Component.extend({});`;
|
|
155
155
|
}
|
|
156
156
|
break;
|
|
157
157
|
case '@glimmer/component':
|
|
158
158
|
importComponent = `import Component from '@glimmer/component';`;
|
|
159
|
-
defaultExport = `class ${classifiedModuleName}Component extends Component {
|
|
159
|
+
defaultExport = `class ${classifiedModuleName}Component extends Component {}`;
|
|
160
160
|
break;
|
|
161
161
|
case '@ember/component/template-only':
|
|
162
162
|
importComponent = `import templateOnly from '@ember/component/template-only';`;
|
package/blueprints/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js
CHANGED
|
@@ -3,14 +3,14 @@ import { describe, it } from 'mocha';
|
|
|
3
3
|
import { setupComponentTest } from 'ember-mocha';<% if (testType === 'integration') { %>
|
|
4
4
|
import hbs from 'htmlbars-inline-precompile';<% } %>
|
|
5
5
|
|
|
6
|
-
describe('<%= friendlyTestDescription %>', function() {
|
|
6
|
+
describe('<%= friendlyTestDescription %>', function () {
|
|
7
7
|
setupComponentTest('<%= componentPathName %>', {
|
|
8
|
-
<% if (testType === 'integration' ) { %>integration: true
|
|
8
|
+
<% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
|
|
9
9
|
// needs: ['component:foo', 'helper:bar'],
|
|
10
|
-
unit: true
|
|
10
|
+
unit: true,<% } %>
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
it('renders', function() {
|
|
13
|
+
it('renders', function () {
|
|
14
14
|
<% if (testType === 'integration' ) { %>// Set any properties with this.set('myProperty', 'value');
|
|
15
15
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
16
16
|
|
|
@@ -2,14 +2,16 @@ import { expect } from 'chai';
|
|
|
2
2
|
import { describeComponent, it } from 'ember-mocha';<% if (testType === 'integration') { %>
|
|
3
3
|
import hbs from 'htmlbars-inline-precompile';<% } %>
|
|
4
4
|
|
|
5
|
-
describeComponent(
|
|
5
|
+
describeComponent(
|
|
6
|
+
'<%= componentPathName %>',
|
|
7
|
+
'<%= friendlyTestDescription %>',
|
|
6
8
|
{
|
|
7
|
-
<% if (testType === 'integration' ) { %>integration: true
|
|
9
|
+
<% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
|
|
8
10
|
// needs: ['component:foo', 'helper:bar'],
|
|
9
|
-
unit: true
|
|
11
|
+
unit: true,<% } %>
|
|
10
12
|
},
|
|
11
|
-
function() {
|
|
12
|
-
it('renders', function() {
|
|
13
|
+
function () {
|
|
14
|
+
it('renders', function () {
|
|
13
15
|
<% if (testType === 'integration' ) { %>// Set any properties with this.set('myProperty', 'value');
|
|
14
16
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
15
17
|
|
package/blueprints/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js
CHANGED
|
@@ -4,10 +4,10 @@ import { setupRenderingTest } from 'ember-mocha';
|
|
|
4
4
|
import { render } from '@ember/test-helpers';
|
|
5
5
|
<%= hbsImportStatement %>
|
|
6
6
|
|
|
7
|
-
describe('<%= friendlyTestDescription %>', function() {
|
|
7
|
+
describe('<%= friendlyTestDescription %>', function () {
|
|
8
8
|
setupRenderingTest();
|
|
9
9
|
|
|
10
|
-
it('renders', async function() {
|
|
10
|
+
it('renders', async function () {
|
|
11
11
|
// Set any properties with this.set('myProperty', 'value');
|
|
12
12
|
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
13
13
|
|
|
@@ -28,10 +28,10 @@ describe('<%= friendlyTestDescription %>', function() {
|
|
|
28
28
|
import { describe, it } from 'mocha';
|
|
29
29
|
import { setupTest } from 'ember-mocha';
|
|
30
30
|
|
|
31
|
-
describe('<%= friendlyTestDescription %>', function() {
|
|
31
|
+
describe('<%= friendlyTestDescription %>', function () {
|
|
32
32
|
setupTest();
|
|
33
33
|
|
|
34
|
-
it('exists', function() {
|
|
34
|
+
it('exists', function () {
|
|
35
35
|
let component = this.owner.factoryFor('component:<%= componentPathName %>').create();
|
|
36
36
|
expect(component).to.be.ok;
|
|
37
37
|
});
|
|
@@ -2,13 +2,13 @@ import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'inte
|
|
|
2
2
|
import hbs from 'htmlbars-inline-precompile';<% } %>
|
|
3
3
|
|
|
4
4
|
moduleForComponent('<%= componentPathName %>', '<%= friendlyTestDescription %>', {
|
|
5
|
-
<% if (testType === 'integration' ) { %>integration: true
|
|
5
|
+
<% if (testType === 'integration' ) { %>integration: true,<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
|
|
6
6
|
// needs: ['component:foo', 'helper:bar'],
|
|
7
|
-
unit: true
|
|
7
|
+
unit: true,<% } %>
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
test('it renders', function(assert) {
|
|
11
|
-
|
|
10
|
+
test('it renders', function (assert) {<% if (testType === 'integration' ) { %>
|
|
11
|
+
// Set any properties with this.set('myProperty', 'value');
|
|
12
12
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
13
13
|
|
|
14
14
|
this.render(hbs`<%= selfCloseComponent(componentName) %>`);
|
package/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js
CHANGED
|
@@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit';
|
|
|
3
3
|
import { render } from '@ember/test-helpers';
|
|
4
4
|
<%= hbsImportStatement %>
|
|
5
5
|
|
|
6
|
-
module('<%= friendlyTestDescription %>', function(hooks) {
|
|
6
|
+
module('<%= friendlyTestDescription %>', function (hooks) {
|
|
7
7
|
setupRenderingTest(hooks);
|
|
8
8
|
|
|
9
|
-
test('it renders', async function(assert) {
|
|
9
|
+
test('it renders', async function (assert) {
|
|
10
10
|
// Set any properties with this.set('myProperty', 'value');
|
|
11
11
|
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
12
12
|
|
|
@@ -26,10 +26,10 @@ module('<%= friendlyTestDescription %>', function(hooks) {
|
|
|
26
26
|
});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit';
|
|
27
27
|
import { setupTest } from 'ember-qunit';
|
|
28
28
|
|
|
29
|
-
module('<%= friendlyTestDescription %>', function(hooks) {
|
|
29
|
+
module('<%= friendlyTestDescription %>', function (hooks) {
|
|
30
30
|
setupTest(hooks);
|
|
31
31
|
|
|
32
|
-
test('it exists', function(assert) {
|
|
32
|
+
test('it exists', function (assert) {
|
|
33
33
|
let component = this.owner.factoryFor('component:<%= componentPathName %>').create();
|
|
34
34
|
assert.ok(component);
|
|
35
35
|
});
|
package/blueprints/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js
CHANGED
|
@@ -2,14 +2,14 @@ import { expect } from 'chai';
|
|
|
2
2
|
import { describe, it } from 'mocha';
|
|
3
3
|
import { setupTest } from 'ember-mocha';
|
|
4
4
|
|
|
5
|
-
describe('<%= friendlyTestDescription %>', function() {
|
|
5
|
+
describe('<%= friendlyTestDescription %>', function () {
|
|
6
6
|
setupTest('controller:<%= dasherizedModuleName %>', {
|
|
7
7
|
// Specify the other units that are required for this test.
|
|
8
8
|
// needs: ['controller:foo']
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
// TODO: Replace this with your real tests.
|
|
12
|
-
it('exists', function() {
|
|
12
|
+
it('exists', function () {
|
|
13
13
|
let controller = this.subject();
|
|
14
14
|
expect(controller).to.be.ok;
|
|
15
15
|
});
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import { describeModule, it } from 'ember-mocha';
|
|
3
3
|
|
|
4
|
-
describeModule(
|
|
4
|
+
describeModule(
|
|
5
|
+
'controller:<%= dasherizedModuleName %>',
|
|
6
|
+
'<%= friendlyTestDescription %>',
|
|
5
7
|
{
|
|
6
8
|
// Specify the other units that are required for this test.
|
|
7
9
|
// needs: ['controller:foo']
|
|
8
10
|
},
|
|
9
|
-
function() {
|
|
11
|
+
function () {
|
|
10
12
|
// TODO: Replace this with your real tests.
|
|
11
|
-
it('exists', function() {
|
|
13
|
+
it('exists', function () {
|
|
12
14
|
let controller = this.subject();
|
|
13
15
|
expect(controller).to.be.ok;
|
|
14
16
|
});
|
package/blueprints/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js
CHANGED
|
@@ -2,11 +2,11 @@ import { expect } from 'chai';
|
|
|
2
2
|
import { describe, it } from 'mocha';
|
|
3
3
|
import { setupTest } from 'ember-mocha';
|
|
4
4
|
|
|
5
|
-
describe('<%= friendlyTestDescription %>', function() {
|
|
5
|
+
describe('<%= friendlyTestDescription %>', function () {
|
|
6
6
|
setupTest();
|
|
7
7
|
|
|
8
8
|
// TODO: Replace this with your real tests.
|
|
9
|
-
it('exists', function() {
|
|
9
|
+
it('exists', function () {
|
|
10
10
|
let controller = this.owner.lookup('controller:<%= controllerPathName %>');
|
|
11
11
|
expect(controller).to.be.ok;
|
|
12
12
|
});
|
|
@@ -6,7 +6,7 @@ moduleFor('controller:<%= dasherizedModuleName %>', '<%= friendlyTestDescription
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
// TODO: Replace this with your real tests.
|
|
9
|
-
test('it exists', function(assert) {
|
|
9
|
+
test('it exists', function (assert) {
|
|
10
10
|
let controller = this.subject();
|
|
11
11
|
assert.ok(controller);
|
|
12
12
|
});
|
package/blueprints/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { module, test } from 'qunit';
|
|
2
2
|
import { setupTest } from 'ember-qunit';
|
|
3
3
|
|
|
4
|
-
module('<%= friendlyTestDescription %>', function(hooks) {
|
|
4
|
+
module('<%= friendlyTestDescription %>', function (hooks) {
|
|
5
5
|
setupTest(hooks);
|
|
6
6
|
|
|
7
7
|
// TODO: Replace this with your real tests.
|
|
8
|
-
test('it exists', function(assert) {
|
|
8
|
+
test('it exists', function (assert) {
|
|
9
9
|
let controller = this.owner.lookup('controller:<%= controllerPathName %>');
|
|
10
10
|
assert.ok(controller);
|
|
11
11
|
});
|
|
@@ -3,12 +3,12 @@ import { describe, it } from 'mocha';
|
|
|
3
3
|
import { setupComponentTest } from 'ember-mocha';
|
|
4
4
|
import hbs from 'htmlbars-inline-precompile';
|
|
5
5
|
|
|
6
|
-
describe('<%= friendlyTestName %>', function() {
|
|
6
|
+
describe('<%= friendlyTestName %>', function () {
|
|
7
7
|
setupComponentTest('<%= dasherizedModuleName %>', {
|
|
8
|
-
integration: true
|
|
8
|
+
integration: true,
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
it('renders', function() {
|
|
11
|
+
it('renders', function () {
|
|
12
12
|
// Set any properties with this.set('myProperty', 'value');
|
|
13
13
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
14
14
|
// Template block usage:
|
package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js
CHANGED
|
@@ -2,12 +2,14 @@ import { expect } from 'chai';
|
|
|
2
2
|
import { describeComponent, it } from 'ember-mocha';
|
|
3
3
|
import hbs from 'htmlbars-inline-precompile';
|
|
4
4
|
|
|
5
|
-
describeComponent(
|
|
5
|
+
describeComponent(
|
|
6
|
+
'<%= dasherizedModuleName %>',
|
|
7
|
+
'helper:<%= dasherizedModuleName %>',
|
|
6
8
|
{
|
|
7
|
-
integration: true
|
|
9
|
+
integration: true,
|
|
8
10
|
},
|
|
9
|
-
function() {
|
|
10
|
-
it('renders', function() {
|
|
11
|
+
function () {
|
|
12
|
+
it('renders', function () {
|
|
11
13
|
// Set any properties with this.set('myProperty', 'value');
|
|
12
14
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
13
15
|
// Template block usage:
|
|
@@ -4,11 +4,11 @@ import { setupRenderingTest } from 'ember-mocha';
|
|
|
4
4
|
import { render } from '@ember/test-helpers';
|
|
5
5
|
<%= hbsImportStatement %>
|
|
6
6
|
|
|
7
|
-
describe('<%= friendlyTestName %>', function() {
|
|
7
|
+
describe('<%= friendlyTestName %>', function () {
|
|
8
8
|
setupRenderingTest();
|
|
9
9
|
|
|
10
10
|
// TODO: Replace this with your real tests.
|
|
11
|
-
it('renders', async function() {
|
|
11
|
+
it('renders', async function () {
|
|
12
12
|
this.set('inputValue', '1234');
|
|
13
13
|
|
|
14
14
|
await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
|
package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js
CHANGED
|
@@ -2,11 +2,11 @@ import { moduleForComponent, test } from 'ember-qunit';
|
|
|
2
2
|
import hbs from 'htmlbars-inline-precompile';
|
|
3
3
|
|
|
4
4
|
moduleForComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleName %>', {
|
|
5
|
-
integration: true
|
|
5
|
+
integration: true,
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
// TODO: Replace this with your real tests.
|
|
9
|
-
test('it renders', function(assert) {
|
|
9
|
+
test('it renders', function (assert) {
|
|
10
10
|
this.set('inputValue', '1234');
|
|
11
11
|
|
|
12
12
|
this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
|
|
@@ -3,11 +3,11 @@ import { setupRenderingTest } from 'ember-qunit';
|
|
|
3
3
|
import { render } from '@ember/test-helpers';
|
|
4
4
|
<%= hbsImportStatement %>
|
|
5
5
|
|
|
6
|
-
module('<%= friendlyTestName %>', function(hooks) {
|
|
6
|
+
module('<%= friendlyTestName %>', function (hooks) {
|
|
7
7
|
setupRenderingTest(hooks);
|
|
8
8
|
|
|
9
9
|
// TODO: Replace this with your real tests.
|
|
10
|
-
test('it renders', async function(assert) {
|
|
10
|
+
test('it renders', async function (assert) {
|
|
11
11
|
this.set('inputValue', '1234');
|
|
12
12
|
|
|
13
13
|
await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
|
package/blueprints/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js
CHANGED
|
@@ -3,24 +3,23 @@ import { describe, it, beforeEach, afterEach } from 'mocha';
|
|
|
3
3
|
import { run } from '@ember/runloop';
|
|
4
4
|
import Application from '@ember/application';
|
|
5
5
|
import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
|
|
6
|
-
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app'
|
|
7
|
-
|
|
8
|
-
describe('<%= friendlyTestName %>', function() {
|
|
6
|
+
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';\n<% } %>
|
|
7
|
+
describe('<%= friendlyTestName %>', function () {
|
|
9
8
|
let application;
|
|
10
9
|
|
|
11
|
-
beforeEach(function() {
|
|
12
|
-
run(function() {
|
|
10
|
+
beforeEach(function () {
|
|
11
|
+
run(function () {
|
|
13
12
|
application = Application.create();
|
|
14
13
|
application.deferReadiness();
|
|
15
14
|
});
|
|
16
15
|
});
|
|
17
16
|
|
|
18
|
-
afterEach(function() {
|
|
17
|
+
afterEach(function () {
|
|
19
18
|
<% if (destroyAppExists) { %>destroyApp(application);<% } else { %>run(application, 'destroy');<% } %>
|
|
20
19
|
});
|
|
21
20
|
|
|
22
21
|
// TODO: Replace this with your real tests.
|
|
23
|
-
it('works', function() {
|
|
22
|
+
it('works', function () {
|
|
24
23
|
initialize(application);
|
|
25
24
|
|
|
26
25
|
// you would normally confirm the results of the initializer here
|
|
@@ -4,23 +4,23 @@ import Application from '@ember/application';
|
|
|
4
4
|
import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
|
|
5
5
|
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
|
|
6
6
|
|
|
7
|
-
describe('<%= friendlyTestName %>', function() {
|
|
8
|
-
beforeEach(function() {
|
|
7
|
+
describe('<%= friendlyTestName %>', function () {
|
|
8
|
+
beforeEach(function () {
|
|
9
9
|
this.TestApplication = Application.extend();
|
|
10
10
|
this.TestApplication.initializer({
|
|
11
11
|
name: 'initializer under test',
|
|
12
|
-
initialize
|
|
12
|
+
initialize,
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
this.application = this.TestApplication.create({ autoboot: false });
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
afterEach(function() {
|
|
18
|
+
afterEach(function () {
|
|
19
19
|
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
// TODO: Replace this with your real tests.
|
|
23
|
-
it('works', async function() {
|
|
23
|
+
it('works', async function () {
|
|
24
24
|
await this.application.boot();
|
|
25
25
|
|
|
26
26
|
// you would normally confirm the results of the initializer here
|
package/blueprints/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js
CHANGED
|
@@ -3,8 +3,7 @@ import { run } from '@ember/runloop';
|
|
|
3
3
|
|
|
4
4
|
import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
|
|
5
5
|
import { module, test } from 'qunit';
|
|
6
|
-
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app'
|
|
7
|
-
|
|
6
|
+
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';\n<% } %>
|
|
8
7
|
module('<%= friendlyTestName %>', {
|
|
9
8
|
beforeEach() {
|
|
10
9
|
run(() => {
|
|
@@ -14,11 +13,11 @@ module('<%= friendlyTestName %>', {
|
|
|
14
13
|
},
|
|
15
14
|
afterEach() {
|
|
16
15
|
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
|
|
17
|
-
}
|
|
16
|
+
},
|
|
18
17
|
});
|
|
19
18
|
|
|
20
19
|
// TODO: Replace this with your real tests.
|
|
21
|
-
test('it works', function(assert) {
|
|
20
|
+
test('it works', function (assert) {
|
|
22
21
|
initialize(this.application);
|
|
23
22
|
|
|
24
23
|
// you would normally confirm the results of the initializer here
|
|
@@ -5,23 +5,23 @@ import { run } from '@ember/runloop';
|
|
|
5
5
|
import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
|
|
6
6
|
import destroyApp from '../../helpers/destroy-app';
|
|
7
7
|
|
|
8
|
-
describe('<%= friendlyTestName %>', function() {
|
|
8
|
+
describe('<%= friendlyTestName %>', function () {
|
|
9
9
|
let application, appInstance;
|
|
10
10
|
|
|
11
|
-
beforeEach(function() {
|
|
12
|
-
run(function() {
|
|
11
|
+
beforeEach(function () {
|
|
12
|
+
run(function () {
|
|
13
13
|
application = Application.create();
|
|
14
14
|
appInstance = application.buildInstance();
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
afterEach(function() {
|
|
18
|
+
afterEach(function () {
|
|
19
19
|
run(appInstance, 'destroy');
|
|
20
20
|
destroyApp(application);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// TODO: Replace this with your real tests.
|
|
24
|
-
it('works', function() {
|
|
24
|
+
it('works', function () {
|
|
25
25
|
initialize(appInstance);
|
|
26
26
|
|
|
27
27
|
// you would normally confirm the results of the initializer here
|
|
@@ -4,23 +4,23 @@ import Application from '@ember/application';
|
|
|
4
4
|
import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
|
|
5
5
|
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>
|
|
6
6
|
|
|
7
|
-
describe('<%= friendlyTestName %>', function() {
|
|
8
|
-
beforeEach(function() {
|
|
7
|
+
describe('<%= friendlyTestName %>', function () {
|
|
8
|
+
beforeEach(function () {
|
|
9
9
|
this.TestApplication = Application.extend();
|
|
10
10
|
this.TestApplication.instanceInitializer({
|
|
11
11
|
name: 'initializer under test',
|
|
12
|
-
initialize
|
|
12
|
+
initialize,
|
|
13
13
|
});
|
|
14
14
|
this.application = this.TestApplication.create({ autoboot: false });
|
|
15
15
|
this.instance = this.application.buildInstance();
|
|
16
16
|
});
|
|
17
|
-
afterEach(function() {
|
|
17
|
+
afterEach(function () {
|
|
18
18
|
<% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>
|
|
19
19
|
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
// TODO: Replace this with your real tests.
|
|
23
|
-
it('works', async function() {
|
|
23
|
+
it('works', async function () {
|
|
24
24
|
await this.instance.boot();
|
|
25
25
|
|
|
26
26
|
expect(true).to.be.ok;
|
|
@@ -14,11 +14,11 @@ module('<%= friendlyTestName %>', {
|
|
|
14
14
|
afterEach() {
|
|
15
15
|
run(this.appInstance, 'destroy');
|
|
16
16
|
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
// TODO: Replace this with your real tests.
|
|
21
|
-
test('it works', function(assert) {
|
|
21
|
+
test('it works', function (assert) {
|
|
22
22
|
initialize(this.appInstance);
|
|
23
23
|
|
|
24
24
|
// you would normally confirm the results of the initializer here
|
|
@@ -3,9 +3,9 @@ import { describe, it } from 'mocha';
|
|
|
3
3
|
import EmberObject from '@ember/object';
|
|
4
4
|
import <%= classifiedModuleName %>Mixin from '<%= dasherizedPackageName %>/mixins/<%= dasherizedModuleName %>';
|
|
5
5
|
|
|
6
|
-
describe('<%= friendlyTestName %>', function() {
|
|
6
|
+
describe('<%= friendlyTestName %>', function () {
|
|
7
7
|
// TODO: Replace this with your real tests.
|
|
8
|
-
it('works', function() {
|
|
8
|
+
it('works', function () {
|
|
9
9
|
let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin);
|
|
10
10
|
let subject = <%= classifiedModuleName %>Object.create();
|
|
11
11
|
expect(subject).to.be.ok;
|
|
@@ -3,9 +3,9 @@ import { describe, it } from 'mocha';
|
|
|
3
3
|
import EmberObject from '@ember/object';
|
|
4
4
|
import <%= classifiedModuleName %>Mixin from '<%= dasherizedPackageName %>/mixins/<%= dasherizedModuleName %>';
|
|
5
5
|
|
|
6
|
-
describe('<%= friendlyTestName %>', function() {
|
|
6
|
+
describe('<%= friendlyTestName %>', function () {
|
|
7
7
|
// TODO: Replace this with your real tests.
|
|
8
|
-
it('works', function() {
|
|
8
|
+
it('works', function () {
|
|
9
9
|
let <%= classifiedModuleName %>Object = EmberObject.extend(<%= classifiedModuleName %>Mixin);
|
|
10
10
|
let subject = <%= classifiedModuleName %>Object.create();
|
|
11
11
|
expect(subject).to.be.ok;
|