Skip to content

Commit

Permalink
Avoid global resolver in tests/node app setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Jul 22, 2021
1 parent 082dc76 commit ceeeb5a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/node/helpers/setup-app.js
Expand Up @@ -92,16 +92,23 @@ function createApplication() {

let app = this.Ember.Application.extend().create({
autoboot: false,
Resolver: {
create: (specifier) => {
return this.registry[specifier];
},
},
});

app.Router = this.Ember.Router.extend({
let Router = this.Ember.Router.extend({
location: 'none',
});

if (this.routesCallback) {
app.Router.map(this.routesCallback);
Router.map(this.routesCallback);
}

this.register('router:main', Router);

registerApplicationClasses(app, this.registry);

// Run application initializers
Expand Down

0 comments on commit ceeeb5a

Please sign in to comment.