Skip to content

Commit

Permalink
Merge pull request #18436 from Gaurav0/deprecate_globals_resolver
Browse files Browse the repository at this point in the history
[DEPRECATION] Deprecate globals resolver
  • Loading branch information
rwjblue authored Nov 19, 2019
2 parents fbae785 + e7b2c13 commit 7b9f0af
Show file tree
Hide file tree
Showing 22 changed files with 614 additions and 366 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ApplicationTestCase, moduleFor, strip } from 'internal-test-helpers';
import {
ApplicationTestCase,
ModuleBasedTestResolver,
moduleFor,
strip,
} from 'internal-test-helpers';

import { ENV } from '@ember/-internals/environment';
import {
Expand Down Expand Up @@ -292,6 +297,7 @@ if (ENV._DEBUG_RENDER_TREE) {
'engine:foo',
class extends Engine {
isFooEngine = true;
Resolver = ModuleBasedTestResolver;

init() {
super.init(...arguments);
Expand Down Expand Up @@ -327,6 +333,8 @@ if (ENV._DEBUG_RENDER_TREE) {
this.add(
'engine:bar',
class extends Engine {
Resolver = ModuleBasedTestResolver;

init() {
super.init(...arguments);
this.register(
Expand Down Expand Up @@ -670,6 +678,7 @@ if (ENV._DEBUG_RENDER_TREE) {
'engine:foo',
class extends Engine {
isFooEngine = true;
Resolver = ModuleBasedTestResolver;

init() {
super.init(...arguments);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { moduleFor, ApplicationTestCase, strip, runTaskNext } from 'internal-test-helpers';
import {
moduleFor,
ApplicationTestCase,
ModuleBasedTestResolver,
strip,
runTaskNext,
} from 'internal-test-helpers';

import { Component } from '@ember/-internals/glimmer';
import { Route } from '@ember/-internals/routing';
Expand Down Expand Up @@ -80,6 +86,8 @@ moduleFor(
this.add(
'engine:blog',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down Expand Up @@ -131,6 +139,8 @@ moduleFor(
this.add(
'engine:chat-engine',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register('template:application', compile('Engine'));
Expand Down Expand Up @@ -167,6 +177,8 @@ moduleFor(
this.add(
'engine:blog',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register('template:foo', compile('foo partial'));
Expand Down Expand Up @@ -202,6 +214,8 @@ moduleFor(
this.add(
'engine:chat-engine',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register('template:foo', compile('foo partial'));
Expand Down Expand Up @@ -230,6 +244,8 @@ moduleFor(
this.add(
'engine:chat-engine',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register('template:components/foo-bar', compile(`{{partial "troll"}}`));
Expand Down Expand Up @@ -289,6 +305,8 @@ moduleFor(
this.add(
'engine:blog',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);

Expand Down Expand Up @@ -344,6 +362,8 @@ moduleFor(
this.add(
'engine:blog',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down Expand Up @@ -486,6 +506,8 @@ moduleFor(
this.add(
'engine:blog',
Engine.extend({
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register('template:application', compile('Engine{{outlet}}'));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { moduleFor, ApplicationTestCase, RenderingTestCase, runTask } from 'internal-test-helpers';
import {
moduleFor,
ApplicationTestCase,
ModuleBasedTestResolver,
RenderingTestCase,
runTask,
} from 'internal-test-helpers';

import { set } from '@ember/-internals/metal';
import { getOwner } from '@ember/-internals/owner';
Expand Down Expand Up @@ -48,6 +54,7 @@ moduleFor(
'engine:chat',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
Expand Down Expand Up @@ -165,6 +172,8 @@ moduleFor(
'engine:foo',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand All @@ -180,6 +189,8 @@ moduleFor(
'engine:bar',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down Expand Up @@ -244,6 +255,8 @@ moduleFor(
'engine:foo',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down Expand Up @@ -299,6 +312,8 @@ moduleFor(
'engine:paramEngine',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down Expand Up @@ -393,6 +408,8 @@ moduleFor(
'engine:componentParamEngine',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down Expand Up @@ -429,6 +446,8 @@ if (!EMBER_ROUTING_MODEL_ARG) {
'engine:paramEngine',
Engine.extend({
router: null,
Resolver: ModuleBasedTestResolver,

init() {
this._super(...arguments);
this.register(
Expand Down
Loading

0 comments on commit 7b9f0af

Please sign in to comment.