MAINT: Upgrade ember to 2.14 (#10)
This commit is contained in:
parent
d58b4e218c
commit
4c58b0c331
14 changed files with 84 additions and 62 deletions
5
tests/.eslintrc.js
Normal file
5
tests/.eslintrc.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
embertest: true
|
||||
}
|
||||
};
|
|
@ -3,7 +3,7 @@ import Ember from 'ember';
|
|||
import startApp from '../helpers/start-app';
|
||||
import destroyApp from '../helpers/destroy-app';
|
||||
|
||||
const { RSVP: { Promise } } = Ember;
|
||||
const { RSVP: { resolve } } = Ember;
|
||||
|
||||
export default function(name, options = {}) {
|
||||
module(name, {
|
||||
|
@ -17,7 +17,7 @@ export default function(name, options = {}) {
|
|||
|
||||
afterEach() {
|
||||
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
|
||||
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
|
||||
return resolve(afterEach).then(() => destroyApp(this.application));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,16 +3,13 @@ import Application from '../../app';
|
|||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
let application;
|
||||
|
||||
let attributes = Ember.merge({}, config.APP);
|
||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
Ember.run(() => {
|
||||
application = Application.create(attributes);
|
||||
return Ember.run(() => {
|
||||
let application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
return application;
|
||||
});
|
||||
|
||||
return application;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import resolver from './helpers/resolver';
|
||||
import './helpers/flash-message';
|
||||
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
import { start } from 'ember-cli-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue