Skip to content

Commit

Permalink
Remove Ember.DefaultResolver / Ember.Resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
btecu committed Jul 18, 2021
1 parent d823959 commit 5a0f14d
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 1,159 deletions.
468 changes: 0 additions & 468 deletions packages/@ember/application/globals-resolver.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/@ember/application/resolver.js

This file was deleted.

54 changes: 2 additions & 52 deletions packages/@ember/application/tests/application_test.js
@@ -1,8 +1,7 @@
import { DEBUG } from '@glimmer/env';
import VERSION from 'ember/version';
import { ENV, context } from '@ember/-internals/environment';
import { libraries, processAllNamespaces } from '@ember/-internals/metal';
import { getName } from '@ember/-internals/utils';
import { ENV } from '@ember/-internals/environment';
import { libraries } from '@ember/-internals/metal';
import { getDebugFunction, setDebugFunction } from '@ember/debug';
import { Router, NoneLocation, Route as EmberRoute } from '@ember/-internals/routing';
import { jQueryDisabled, jQuery } from '@ember/-internals/views';
Expand All @@ -15,7 +14,6 @@ import {
ApplicationTestCase,
AbstractTestCase,
AutobootApplicationTestCase,
DefaultResolverApplicationTestCase,
verifyInjection,
verifyRegistration,
runTask,
Expand Down Expand Up @@ -171,54 +169,6 @@ moduleFor(
}
);

moduleFor(
'Application, default resolver with autoboot',
class extends DefaultResolverApplicationTestCase {
constructor() {
super(...arguments);
this.originalLookup = context.lookup;
}

teardown() {
context.lookup = this.originalLookup;
super.teardown();
setTemplates({});
}

get applicationOptions() {
return Object.assign(super.applicationOptions, {
autoboot: true,
});
}

[`@test acts like a namespace`](assert) {
this.application = runTask(() => this.createApplication());
let Foo = (this.application.Foo = EmberObject.extend());
processAllNamespaces();
assert.equal(getName(Foo), 'TestApp.Foo', 'Classes pick up their parent namespace');
}

[`@test can specify custom router`](assert) {
let MyRouter = Router.extend();
runTask(() => {
this.createApplication();
this.application.Router = MyRouter;
});

assert.ok(
this.application.__deprecatedInstance__.lookup('router:main') instanceof MyRouter,
'application resolved the correct router'
);
}

[`@test Minimal Application initialized with just an application template`]() {
this.setupFixture('<script type="text/x-handlebars">Hello World</script>');
runTask(() => this.createApplication());
this.assertInnerHTML('Hello World');
}
}
);

moduleFor(
'Application, autobooting',
class extends AutobootApplicationTestCase {
Expand Down
27 changes: 0 additions & 27 deletions packages/@ember/application/tests/bootstrap-test.js

This file was deleted.

This file was deleted.

0 comments on commit 5a0f14d

Please sign in to comment.