ember-source 4.5.0-alpha.4 → 4.5.0-beta.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 +13 -4
- package/blueprints-js/-addon-import.js +48 -0
- package/blueprints-js/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +24 -0
- package/blueprints-js/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
- package/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +12 -0
- package/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
- package/blueprints-js/component/files/__root__/__path__/__name__.js +3 -0
- package/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs +1 -0
- package/blueprints-js/component-addon/files/__root__/__path__/__name__.js +1 -0
- package/blueprints-js/component-class/files/__root__/__path__/__name__.js +3 -0
- package/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js +1 -0
- package/blueprints-js/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +34 -0
- package/blueprints-js/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +36 -0
- package/blueprints-js/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +38 -0
- package/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +31 -0
- package/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +36 -0
- package/blueprints-js/controller/files/__root__/__path__/__name__.js +3 -0
- package/blueprints-js/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
- package/blueprints-js/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
- package/blueprints-js/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
- package/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
- package/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
- package/blueprints-js/helper/files/__root__/__collection__/__name__.js +5 -0
- package/blueprints-js/helper/mu-files/__root__/__collection__/__name__.js +7 -0
- package/blueprints-js/helper-addon/files/__root__/__path__/__name__.js +1 -0
- package/blueprints-js/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +26 -0
- package/blueprints-js/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +28 -0
- package/blueprints-js/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +18 -0
- package/blueprints-js/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +15 -0
- package/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +17 -0
- package/blueprints-js/initializer/files/__root__/initializers/__name__.js +5 -0
- package/blueprints-js/initializer-addon/files/__root__/__path__/__name__.js +1 -0
- package/blueprints-js/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +28 -0
- package/blueprints-js/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +31 -0
- package/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +25 -0
- package/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +37 -0
- package/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js +5 -0
- package/blueprints-js/instance-initializer-addon/files/__root__/__path__/__name__.js +1 -0
- package/blueprints-js/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +30 -0
- package/blueprints-js/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +32 -0
- package/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +26 -0
- package/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +39 -0
- package/blueprints-js/mixin/files/__root__/mixins/__name__.js +3 -0
- package/blueprints-js/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +13 -0
- package/blueprints-js/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +13 -0
- package/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +12 -0
- package/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +12 -0
- package/blueprints-js/route/files/__root__/__path__/__name__.js +9 -0
- package/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs +2 -0
- package/blueprints-js/route-addon/files/__root__/__path__/__name__.js +1 -0
- package/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js +1 -0
- package/blueprints-js/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +15 -0
- package/blueprints-js/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +17 -0
- package/blueprints-js/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
- package/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +11 -0
- package/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +11 -0
- package/blueprints-js/service/files/__root__/__path__/__name__.js +3 -0
- package/blueprints-js/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
- package/blueprints-js/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
- package/blueprints-js/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
- package/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
- package/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
- package/blueprints-js/template/files/__root__/__path__/__name__.hbs +0 -0
- package/blueprints-js/test-framework-detector.js +60 -0
- package/blueprints-js/util/files/__root__/utils/__name__.js +3 -0
- package/blueprints-js/util-test/mocha-files/__root__/__testType__/__name__-test.js +11 -0
- package/blueprints-js/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +11 -0
- package/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js +10 -0
- package/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +10 -0
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +12 -5
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +722 -1001
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +2 -2
- package/dist/packages/@ember/-internals/glimmer/index.js +33 -23
- package/dist/packages/@ember/-internals/metal/index.js +19 -7
- package/dist/packages/@ember/-internals/routing/lib/location/api.js +3 -3
- package/dist/packages/@ember/-internals/routing/lib/location/auto_location.js +5 -1
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +7 -6
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +9 -6
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +6 -9
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +4 -2
- package/dist/packages/@ember/-internals/routing/lib/utils.js +15 -25
- package/dist/packages/@ember/-internals/runtime/lib/compare.js +4 -1
- package/dist/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +14 -15
- package/dist/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +32 -44
- package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +1 -1
- package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +7 -22
- package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +34 -46
- package/dist/packages/@ember/-internals/runtime/lib/mixins/enumerable.js +2 -15
- package/dist/packages/@ember/-internals/runtime/lib/mixins/evented.js +13 -57
- package/dist/packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.js +2 -16
- package/dist/packages/@ember/-internals/runtime/lib/mixins/observable.js +64 -134
- package/dist/packages/@ember/-internals/runtime/lib/mixins/promise_proxy.js +28 -86
- package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +59 -61
- package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +17 -24
- package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +59 -85
- package/dist/packages/@ember/-internals/runtime/lib/system/object.js +9 -2
- package/dist/packages/@ember/-internals/runtime/lib/system/object_proxy.js +3 -77
- package/dist/packages/@ember/-internals/utils/index.js +1 -1
- package/dist/packages/@ember/-internals/utils/types.js +1 -0
- package/dist/packages/@ember/-internals/views/lib/compat/attrs.js +1 -2
- package/dist/packages/@ember/-internals/views/lib/component_lookup.js +2 -2
- package/dist/packages/@ember/-internals/views/lib/mixins/action_support.js +3 -9
- package/dist/packages/@ember/-internals/views/lib/mixins/child_views_support.js +4 -6
- package/dist/packages/@ember/-internals/views/lib/mixins/class_names_support.js +13 -18
- package/dist/packages/@ember/-internals/views/lib/mixins/view_state_support.js +3 -2
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +57 -58
- package/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js +142 -120
- package/dist/packages/@ember/-internals/views/lib/system/utils.js +1 -1
- package/dist/packages/@ember/-internals/views/lib/views/states/destroying.js +1 -1
- package/dist/packages/@ember/-internals/views/lib/views/states/has_element.js +2 -2
- package/dist/packages/@ember/-internals/views/lib/views/states/in_dom.js +3 -1
- package/dist/packages/@ember/application/instance.js +1 -0
- package/dist/packages/@ember/application/lib/application.js +8 -1
- package/dist/packages/@ember/canary-features/index.js +2 -2
- package/dist/packages/@ember/engine/instance.js +1 -1
- package/dist/packages/@ember/engine/lib/engine-parent.js +1 -5
- package/dist/packages/@ember/renderer/index.js +28 -0
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +838 -712
- package/package.json +4 -3
package/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js
ADDED
|
@@ -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 @@
|
|
|
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,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 @@
|
|
|
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
|
+
);
|
package/blueprints-js/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
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
|
+
});
|
package/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { module, test } from 'qunit';
|
|
2
|
+
import { setupTest } from '<%= dasherizedPackageName %>/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
|
+
});
|
package/blueprints-js/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js
ADDED
|
@@ -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
|
+
);
|
package/blueprints-js/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js
ADDED
|
@@ -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 service = this.owner.lookup('service:<%= dasherizedModuleName %>');
|
|
11
|
+
expect(service).to.be.ok;
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { moduleFor, test } from 'ember-qunit';
|
|
2
|
+
|
|
3
|
+
moduleFor('service:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', {
|
|
4
|
+
// Specify the other units that are required for this test.
|
|
5
|
+
// needs: ['service:foo']
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// TODO: Replace this with your real tests.
|
|
9
|
+
test('it exists', function (assert) {
|
|
10
|
+
let service = this.subject();
|
|
11
|
+
assert.ok(service);
|
|
12
|
+
});
|
package/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js
ADDED
|
@@ -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 service = this.owner.lookup('service:<%= dasherizedModuleName %>');
|
|
10
|
+
assert.ok(service);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const VersionChecker = require('ember-cli-version-checker');
|
|
6
|
+
|
|
7
|
+
module.exports = function (blueprint) {
|
|
8
|
+
blueprint.supportsAddon = function () {
|
|
9
|
+
return false;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
blueprint.filesPath = function () {
|
|
13
|
+
let type;
|
|
14
|
+
const qunitRfcVersion = 'qunit-rfc-232';
|
|
15
|
+
const mochaRfcVersion = 'mocha-rfc-232';
|
|
16
|
+
const mochaVersion = 'mocha-0.12';
|
|
17
|
+
|
|
18
|
+
let dependencies = this.project.dependencies();
|
|
19
|
+
if ('ember-qunit' in dependencies) {
|
|
20
|
+
type = qunitRfcVersion;
|
|
21
|
+
} else if ('ember-cli-qunit' in dependencies) {
|
|
22
|
+
let checker = new VersionChecker(this.project);
|
|
23
|
+
if (
|
|
24
|
+
fs.existsSync(`${this.path}/${qunitRfcVersion}-files`) &&
|
|
25
|
+
checker.for('ember-cli-qunit', 'npm').gte('4.2.0')
|
|
26
|
+
) {
|
|
27
|
+
type = qunitRfcVersion;
|
|
28
|
+
} else {
|
|
29
|
+
type = 'qunit';
|
|
30
|
+
}
|
|
31
|
+
} else if ('ember-mocha' in dependencies) {
|
|
32
|
+
let checker = new VersionChecker(this.project);
|
|
33
|
+
if (
|
|
34
|
+
fs.existsSync(`${this.path}/${mochaRfcVersion}-files`) &&
|
|
35
|
+
checker.for('ember-mocha', 'npm').gte('0.14.0')
|
|
36
|
+
) {
|
|
37
|
+
type = mochaRfcVersion;
|
|
38
|
+
} else {
|
|
39
|
+
type = mochaVersion;
|
|
40
|
+
}
|
|
41
|
+
} else if ('ember-cli-mocha' in dependencies) {
|
|
42
|
+
let checker = new VersionChecker(this.project);
|
|
43
|
+
if (
|
|
44
|
+
fs.existsSync(`${this.path}/${mochaVersion}-files`) &&
|
|
45
|
+
checker.for('ember-cli-mocha', 'npm').gte('0.12.0')
|
|
46
|
+
) {
|
|
47
|
+
type = mochaVersion;
|
|
48
|
+
} else {
|
|
49
|
+
type = 'mocha';
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
this.ui.writeLine("Couldn't determine test style - using QUnit");
|
|
53
|
+
type = 'qunit';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return path.join(this.path, type + '-files');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return blueprint;
|
|
60
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import { describe, it } from 'mocha';
|
|
3
|
+
import <%= camelizedModuleName %> from '<%= dasherizedPackageName %>/utils/<%= dasherizedModuleName %>';
|
|
4
|
+
|
|
5
|
+
describe('<%= friendlyTestName %>', function () {
|
|
6
|
+
// TODO: Replace this with your real tests.
|
|
7
|
+
it('works', function () {
|
|
8
|
+
let result = <%= camelizedModuleName %>();
|
|
9
|
+
expect(result).to.be.ok;
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import { describe, it } from 'mocha';
|
|
3
|
+
import <%= camelizedModuleName %> from '<%= dasherizedPackageName %>/utils/<%= dasherizedModuleName %>';
|
|
4
|
+
|
|
5
|
+
describe('<%= friendlyTestName %>', function () {
|
|
6
|
+
// TODO: Replace this with your real tests.
|
|
7
|
+
it('works', function () {
|
|
8
|
+
let result = <%= camelizedModuleName %>();
|
|
9
|
+
expect(result).to.be.ok;
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import <%= camelizedModuleName %> from '<%= dasherizedModulePrefix %>/utils/<%= dasherizedModuleName %>';
|
|
2
|
+
import { module, test } from 'qunit';
|
|
3
|
+
|
|
4
|
+
module('<%= friendlyTestName %>');
|
|
5
|
+
|
|
6
|
+
// TODO: Replace this with your real tests.
|
|
7
|
+
test('it works', function (assert) {
|
|
8
|
+
let result = <%= camelizedModuleName %>();
|
|
9
|
+
assert.ok(result);
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import <%= camelizedModuleName %> from '<%= dasherizedModulePrefix %>/utils/<%= dasherizedModuleName %>';
|
|
2
|
+
import { module, test } from 'qunit';
|
|
3
|
+
|
|
4
|
+
module('<%= friendlyTestName %>', function () {
|
|
5
|
+
// TODO: Replace this with your real tests.
|
|
6
|
+
test('it works', function (assert) {
|
|
7
|
+
let result = <%= camelizedModuleName %>();
|
|
8
|
+
assert.ok(result);
|
|
9
|
+
});
|
|
10
|
+
});
|
package/build-metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.5.0-
|
|
2
|
+
"version": "4.5.0-beta.2",
|
|
3
3
|
"buildType": "tag",
|
|
4
|
-
"SHA": "
|
|
5
|
-
"assetPath": "/tag/shas/
|
|
4
|
+
"SHA": "699e2301129887df0d498884e1767533219e4b99",
|
|
5
|
+
"assetPath": "/tag/shas/699e2301129887df0d498884e1767533219e4b99.tgz"
|
|
6
6
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 4.5.0-
|
|
9
|
+
* @version 4.5.0-beta.2
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* eslint-disable no-var */
|
|
@@ -954,7 +954,7 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
|
|
|
954
954
|
var key = keys[i];
|
|
955
955
|
(true && !(key) && (0, _debug.assert)('has key', key)); // Looping over array
|
|
956
956
|
|
|
957
|
-
s += inspectKey(key) + ": " + inspectValue(obj[key], depth, seen);
|
|
957
|
+
s += inspectKey(String(key)) + ": " + inspectValue(obj[key], depth, seen);
|
|
958
958
|
}
|
|
959
959
|
|
|
960
960
|
s += ' }';
|
|
@@ -1286,6 +1286,13 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
|
|
|
1286
1286
|
*/
|
|
1287
1287
|
|
|
1288
1288
|
});
|
|
1289
|
+
define("@ember/-internals/utils/types", ["exports"], function (_exports) {
|
|
1290
|
+
"use strict";
|
|
1291
|
+
|
|
1292
|
+
Object.defineProperty(_exports, "__esModule", {
|
|
1293
|
+
value: true
|
|
1294
|
+
});
|
|
1295
|
+
});
|
|
1289
1296
|
define("@ember/canary-features/index", ["exports", "@ember/-internals/environment"], function (_exports, _environment) {
|
|
1290
1297
|
"use strict";
|
|
1291
1298
|
|
|
@@ -1306,8 +1313,8 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1306
1313
|
@public
|
|
1307
1314
|
*/
|
|
1308
1315
|
var DEFAULT_FEATURES = {
|
|
1309
|
-
EMBER_LIBRARIES_ISREGISTERED:
|
|
1310
|
-
EMBER_IMPROVED_INSTRUMENTATION:
|
|
1316
|
+
EMBER_LIBRARIES_ISREGISTERED: false,
|
|
1317
|
+
EMBER_IMPROVED_INSTRUMENTATION: false,
|
|
1311
1318
|
EMBER_UNIQUE_ID_HELPER: true,
|
|
1312
1319
|
EMBER_DEFAULT_HELPER_MANAGER: true
|
|
1313
1320
|
};
|
|
@@ -18732,7 +18739,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
18732
18739
|
value: true
|
|
18733
18740
|
});
|
|
18734
18741
|
_exports.default = void 0;
|
|
18735
|
-
var _default = "4.5.0-
|
|
18742
|
+
var _default = "4.5.0-beta.2";
|
|
18736
18743
|
_exports.default = _default;
|
|
18737
18744
|
});
|
|
18738
18745
|
define("simple-html-tokenizer", ["exports"], function (_exports) {
|