我目前正在尝试开始编写测试(我知道,我知道,我应该在编写应用程序之前完成这项工作),但我目前仍在尝试测试登录功能。
以下是测试:
/* jshint expr:true */
import {
describe,
it,
beforeEach,
afterEach
} from 'mocha';
import { expect } from 'chai';
import Ember from 'ember';
import startApp from '../helpers/start-app';
describe('Integration: Authentication', function() {
var application;
beforeEach(function() {
application = startApp();
});
afterEach(function() {
Ember.run(application, 'destroy');
});
it('User can sign in', function() {
visit('/signin').then(function() {
fillIn('input[name="identification"]', 'username');
fillIn('input[name="password"]', 'password');
click('button[type="submit"]');
andThen(function() {
expect(currentPath()).to.equal('welcome');
})
});
});
});
我收到此错误:
Error: Assertion Failed: calling set on destroyed object (http://localhost:7357/a
ssets/vendor.js:19994)
有谁知道如何解决这个问题?
由于