0
我想在我的應用程序中測試路線設置。 我正在使用Qunit和燼測試助手。Ember RC7:測試路線
我有類似下面的測試:
test("visit can handle wrong urls", function() {
var urlToVisit = "/foo/bogus";
visit(urlToVisit).then(function() {
// this will show me /foo/bogus even though the route does not exist
console.log(app.__container__.lookup('router:main').location.path);
});
});
的問題是,我無法在失敗和成功的訪問加以區分。 任何想法?