Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions packages/container/tests/container_test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ENV } from 'ember-environment';
import { get } from 'ember-metal/property_get';
import { get } from 'ember-metal';
import {
Registry,
getOwner,
OWNER
} from 'container';
import factory from 'container/tests/test-helpers/factory';
} from '../index';
import { factory } from 'internal-test-helpers';

let originalModelInjections;

Expand Down
2 changes: 1 addition & 1 deletion packages/container/tests/owner_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getOwner, setOwner, OWNER } from 'container';
import { getOwner, setOwner, OWNER } from '../index';

QUnit.module('Owner', {});

Expand Down
4 changes: 2 additions & 2 deletions packages/container/tests/registry_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Registry } from 'container';
import factory from 'container/tests/test-helpers/factory';
import { Registry } from '../index';
import { factory } from 'internal-test-helpers';

QUnit.module('Registry');

Expand Down
17 changes: 0 additions & 17 deletions packages/container/tests/test-helpers/build-owner.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/ember-application/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export { default as ApplicationInstance } from './system/application-instance';
export { default as Resolver } from './system/resolver';
export { default as Engine } from './system/engine';
export { default as EngineInstance } from './system/engine-instance';
export { getEngineParent, setEngineParent } from './system/engine-parent';

// add domTemplates initializer (only does something if `ember-template-compiler`
// is loaded already)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Engine from 'ember-application/system/engine';
import Application from 'ember-application/system/application';
import ApplicationInstance from 'ember-application/system/application-instance';
import run from 'ember-metal/run_loop';
import jQuery from 'ember-views/system/jquery';
import factory from 'container/tests/test-helpers/factory';
import Engine from '../../system/engine';
import Application from '../../system/application';
import ApplicationInstance from '../../system/application-instance';
import { run } from 'ember-metal';
import { jQuery } from 'ember-views';
import { privatize as P } from 'container';
import EmberObject from 'ember-runtime/system/object';
import { factory } from 'internal-test-helpers';
import { Object as EmberObject } from 'ember-runtime';

let application, appInstance;

Expand Down
43 changes: 24 additions & 19 deletions packages/ember-application/tests/system/application_test.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
/*globals EmberDev */
import VERSION from 'ember/version';
import { VERSION } from 'ember';
import { ENV, context } from 'ember-environment';
import run from 'ember-metal/run_loop';
import libraries from 'ember-metal/libraries';
import Application from 'ember-application/system/application';
import DefaultResolver from 'ember-application/system/resolver';
import Router from 'ember-routing/system/router';
import View from 'ember-views/views/view';
import Controller from 'ember-runtime/controllers/controller';
import NoneLocation from 'ember-routing/location/none_location';
import EmberObject from 'ember-runtime/system/object';
import { setSearchDisabled as setNamespaceSearchDisabled } from 'ember-runtime/system/namespace';
import EmberRoute from 'ember-routing/system/route';
import jQuery from 'ember-views/system/jquery';
import {
run,
libraries,
getDebugFunction,
setDebugFunction
} from 'ember-metal';
import Application from '../../system/application';
import DefaultResolver from '../../system/resolver';
import { Router, NoneLocation, Route as EmberRoute } from 'ember-routing';
import { jQuery } from 'ember-views';
import {
Controller,
Object as EmberObject,
setNamespaceSearchDisabled,
_loaded
} from 'ember-runtime';
import { compile } from 'ember-template-compiler';
import { _loaded } from 'ember-runtime/system/lazy_load';
import { getDebugFunction, setDebugFunction } from 'ember-metal/debug';
import { setTemplates, setTemplate } from 'ember-glimmer';
import { privatize as P } from 'container';
import { verifyInjection, verifyRegistration } from '../test-helpers/registry-check';
import {
verifyInjection,
verifyRegistration
} from '../test-helpers/registry-check';

let { trim } = jQuery;

Expand Down Expand Up @@ -243,9 +248,9 @@ QUnit.test('initialize application via initialize call', function() {
location: 'none'
});

app.ApplicationView = View.extend({
template: compile('<h1>Hello!</h1>')
});
setTemplate('application', compile(
'<h1>Hello!</h1>'
));
});

// This is not a public way to access the container; we just
Expand Down
8 changes: 4 additions & 4 deletions packages/ember-application/tests/system/bootstrap-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import Router from 'ember-routing/system/router';
import jQuery from 'ember-views/system/jquery';
import { run } from 'ember-metal';
import Application from '../../system/application';
import { Router } from 'ember-routing';
import { jQuery } from 'ember-views';
import { setTemplates } from 'ember-glimmer';

let app;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import jQuery from 'ember-views/system/jquery';
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import DefaultResolver from 'ember-application/system/resolver';
import { jQuery } from 'ember-views';
import { run } from 'ember-metal';
import Application from '../../../system/application';
import DefaultResolver from '../../../system/resolver';
import { compile } from 'ember-template-compiler';

let application;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
/* globals EmberDev */
import { context } from 'ember-environment';
import { getDebugFunction, setDebugFunction } from 'ember-metal/debug';
import run from 'ember-metal/run_loop';
import Controller from 'ember-runtime/controllers/controller';
import Route from 'ember-routing/system/route';
import View from 'ember-views/views/view';
import Service from 'ember-runtime/system/service';
import EmberObject from 'ember-runtime/system/object';
import Namespace from 'ember-runtime/system/namespace';
import Application from 'ember-application/system/application';
import {
getDebugFunction,
setDebugFunction,
run
} from 'ember-metal';
import {
Controller,
Service,
Object as EmberObject,
Namespace
} from 'ember-runtime';
import { Route } from 'ember-routing';
import Application from '../../../system/application';
import {
Component,
setTemplates,
Expand Down Expand Up @@ -235,21 +239,9 @@ QUnit.test('no deprecation warning for service factories that extend from Ember.
registry.resolve('service:foo');
});

QUnit.test('deprecation warning for view factories without isViewFactory property', function() {
expectDeprecation(/view factories must have an `isViewFactory` property/);
application.FooView = EmberObject.extend();
registry.resolve('view:foo');
});

QUnit.test('no deprecation warning for view factories that extend from Ember.View', function() {
expectNoDeprecation();
application.FooView = View.extend();
registry.resolve('view:foo');
});

QUnit.test('deprecation warning for component factories without isComponentFactory property', function() {
expectDeprecation(/component factories must have an `isComponentFactory` property/);
application.FooComponent = View.extend();
application.FooComponent = EmberObject.extend();
registry.resolve('component:foo');
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import { run } from 'ember-metal';
import Application from '../../../system/application';

let application, registry;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { ENV, context } from 'ember-environment'; // lookup, etc
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import EmberObject from 'ember-runtime/system/object';
import DefaultResolver from 'ember-application/system/resolver';
import { guidFor } from 'ember-metal/utils';
import { run, guidFor } from 'ember-metal';
import Application from '../../../system/application';
import { Object as EmberObject } from 'ember-runtime';
import DefaultResolver from '../../../system/resolver';

let originalLookup, App, originalModelInjections;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ENV, context } from 'ember-environment';
import run from 'ember-metal/run_loop';
import EmberObject from 'ember-runtime/system/object';
import Application from 'ember-application/system/application';
import { run } from 'ember-metal';
import { Object as EmberObject } from 'ember-runtime';
import Application from '../../system/application';

let EmberApplication = Application;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import run from 'ember-metal/run_loop';
import Engine from 'ember-application/system/engine';
import { run } from 'ember-metal';
import Engine from '../../system/engine';

let MyEngine, myEngine, myEngineInstance;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import run from 'ember-metal/run_loop';
import Engine from 'ember-application/system/engine';
import EngineInstance from 'ember-application/system/engine-instance';
import { setEngineParent } from 'ember-application/system/engine-parent';
import { run } from 'ember-metal';
import Engine from '../../system/engine';
import EngineInstance from '../../system/engine-instance';
import { setEngineParent } from '../../system/engine-parent';

let MyEngine,
myEngine,
Expand Down
10 changes: 5 additions & 5 deletions packages/ember-application/tests/system/engine_instance_test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Engine from 'ember-application/system/engine';
import EngineInstance from 'ember-application/system/engine-instance';
import { getEngineParent, setEngineParent } from 'ember-application/system/engine-parent';
import run from 'ember-metal/run_loop';
import factory from 'container/tests/test-helpers/factory';
import Engine from '../../system/engine';
import EngineInstance from '../../system/engine-instance';
import { getEngineParent, setEngineParent } from '../../system/engine-parent';
import { run } from 'ember-metal';
import { factory } from 'internal-test-helpers';

let engine, engineInstance;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { getEngineParent, setEngineParent, ENGINE_PARENT } from 'ember-application/system/engine-parent';
import {
getEngineParent,
setEngineParent,
ENGINE_PARENT
} from '../../system/engine-parent';

QUnit.module('EngineParent', {});

Expand Down
11 changes: 7 additions & 4 deletions packages/ember-application/tests/system/engine_test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { context } from 'ember-environment';
import run from 'ember-metal/run_loop';
import Engine from 'ember-application/system/engine';
import EmberObject from 'ember-runtime/system/object';
import { run } from 'ember-metal';
import Engine from '../../system/engine';
import { Object as EmberObject } from 'ember-runtime';
import { privatize as P } from 'container';
import { verifyInjection, verifyRegistration } from '../test-helpers/registry-check';
import {
verifyInjection,
verifyRegistration
} from '../test-helpers/registry-check';

let engine;
let originalLookup = context.lookup;
Expand Down
6 changes: 3 additions & 3 deletions packages/ember-application/tests/system/initializers_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import jQuery from 'ember-views/system/jquery';
import { run } from 'ember-metal';
import Application from '../../system/application';
import { jQuery } from 'ember-views';

let app;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import ApplicationInstance from 'ember-application/system/application-instance';
import jQuery from 'ember-views/system/jquery';
import { run } from 'ember-metal';
import Application from '../../system/application';
import ApplicationInstance from '../../system/application-instance';
import { jQuery } from 'ember-views';

let app;

Expand Down
11 changes: 4 additions & 7 deletions packages/ember-application/tests/system/logging_test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*globals EmberDev */

import Logger from 'ember-console';
import run from 'ember-metal/run_loop';
import Application from 'ember-application/system/application';
import Controller from 'ember-runtime/controllers/controller';
import Route from 'ember-routing/system/route';
import RSVP from 'ember-runtime/ext/rsvp';
import { run } from 'ember-metal';
import Application from '../../system/application';
import { Controller, RSVP } from 'ember-runtime';
import { Route } from 'ember-routing';
import { compile } from 'ember-template-compiler';

import 'ember-routing';

let App, logs, originalLogger;

QUnit.module('Ember.Application – logging of generated classes', {
Expand Down
4 changes: 2 additions & 2 deletions packages/ember-application/tests/system/readiness_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import run from 'ember-metal/run_loop';
import EmberApplication from 'ember-application/system/application';
import { run } from 'ember-metal';
import EmberApplication from '../../system/application';

let jQuery, application, Application;
let readyWasCalled, domReady, readyCallbacks;
Expand Down
11 changes: 4 additions & 7 deletions packages/ember-application/tests/system/reset_test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import run from 'ember-metal/run_loop';
import { get } from 'ember-metal/property_get';
import { set } from 'ember-metal/property_set';
import EmberApplication from 'ember-application/system/application';
import EmberObject from 'ember-runtime/system/object';
import Router from 'ember-routing/system/router';
import Controller from 'ember-runtime/controllers/controller';
import { run, get, set } from 'ember-metal';
import EmberApplication from '../../system/application';
import { Object as EmberObject, Controller } from 'ember-runtime';
import { Router } from 'ember-routing';
import { Registry } from 'container';

let application, Application;
Expand Down
22 changes: 12 additions & 10 deletions packages/ember-application/tests/system/visit_test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import EmberObject from 'ember-runtime/system/object';
import inject from 'ember-runtime/inject';
import run from 'ember-metal/run_loop';
import RSVP, { onerrorDefault } from 'ember-runtime/ext/rsvp';
import Application from 'ember-application/system/application';
import ApplicationInstance from 'ember-application/system/application-instance';
import Engine from 'ember-application/system/engine';
import Route from 'ember-routing/system/route';
import Router from 'ember-routing/system/router';
import {
Object as EmberObject,
inject,
RSVP,
onerrorDefault
} from 'ember-runtime';
import { run } from 'ember-metal';
import Application from '../../system/application';
import ApplicationInstance from '../../system/application-instance';
import Engine from '../../system/engine';
import { Route, Router } from 'ember-routing';
import { Component, helper } from 'ember-glimmer';
import { compile } from 'ember-template-compiler';
import jQuery from 'ember-views/system/jquery';
import { jQuery } from 'ember-views';

let App = null;
let instance = null;
Expand Down
Loading