Skip to content

Commit

Permalink
Merge pull request #27 from Turbo87/new-modules
Browse files Browse the repository at this point in the history
Use RFC176 imports
  • Loading branch information
Turbo87 committed Feb 5, 2018
2 parents 486a711 + 021e119 commit 4c7a09d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
3 changes: 2 additions & 1 deletion tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Application from '@ember/application';
import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
Expand All @@ -7,7 +8,7 @@ let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = Ember.Router.extend({
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Ember from 'ember';
import { run } from '@ember/runloop';

export default function destroyApp(application) {
Ember.run(application, 'destroy');
run(application, 'destroy');
}
4 changes: 1 addition & 3 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Promise } from 'rsvp';
import { module } from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

const { RSVP: { Promise } } = Ember;

export default function(name, options = {}) {
module(name, {
beforeEach() {
Expand Down
9 changes: 5 additions & 4 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import Ember from 'ember';
import { run } from '@ember/runloop';
import { merge } from '@ember/polyfills';
import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
let attributes = merge({}, config.APP);
attributes = merge(attributes, attrs); // use defaults, but you can override;

return Ember.run(() => {
return run(() => {
let application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
Expand Down

0 comments on commit 4c7a09d

Please sign in to comment.