我是Ember测试的新手,并且一直试图编写一些测试。
我的测试是这样写的
// Ember Qoute Flow Test
import Ember from 'ember';
import { test, module } from 'qunit';
import startApp from '../helpers/start-app';
var App;
module("EmberQouteFlow-test", {
setup: function() {
App = startApp();
},
teardown: function() {
Ember.run(App, App.destroy);
}
});
test("simple test", function(assert) {
assert.expect(1);
visit('#/login');
// fillIn('input.everyWeek', 'My new post');
click('everyWeek', "everyWeek was selected");
click('button.submit');
// Wait for asynchronous helpers above to complete
});
test("Transaction Test", function(assert) {
assert.equal(1, 2, "This is a bad test");
});
test("A bad test", function(assert) {
assert.equal(1, 2, "This is a bad test");
});
当我在命令行输入“ember s”时,Ember给了我这个警告。
不行53 PhantomJS 1.9 - TestLoader失败:客户端消费者/测试/集成/ QouteFlow / EmberQouteFlow-test:无法加载
actual: >
null
message: >
Died on test #1 at http://localhost:4200/assets/test-support.js:2809
at http://localhost:4200/assets/test-support.js:5574
at http://localhost:4200/assets/test-loader.js:31
at http://localhost:4200/assets/test-loader.js:21
at http://localhost:4200/assets/test-loader.js:40
at http://localhost:4200/assets/test-support.js:5578: 'undefined' is not a function (evaluating 'ember_qunit.module')
Log: >