EmberJS 新手。我正在尝试进行一些测试..但似乎遇到了一些基本问题。我只是生成了一个验收测试——直接取自 Ember 站点。
import { test } from 'qunit';
import moduleForAcceptance from 'ssd-admin-ember/tests/helpers/module-for-acceptance';
moduleForAcceptance('Acceptance | login');
test('visiting /login', function(assert) {
visit('/xxxlogin');
andThen(function() {
assert.equal(currentURL(), '/abclogin');
});
});
然后我运行它:
ember test --filter 'acceptance/login-test'
这产生...
ok 1 PhantomJS 2.1 - JSHint | acceptance/login-test.js: should pass jshint
1..1
# tests 1
# pass 1
# skip 0
# fail 0
# ok
这怎么可能过去?没有 xxxlogin 路由等。
我一定做错了什么(很明显)。
提前致谢...