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);
});
});
的问题是,我无法在失败和成功的访问加以区分。 任何想法?