0

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 路由等。

我一定做错了什么(很明显)。

提前致谢...

4

1 回答 1

1

你没有运行你的测试。您只运行 JSHint 检查。该文件没问题。

您没有运行测试,因为您的过滤器语句是错误的。它应该是:

ember test --filter "Acceptance | login"
于 2016-09-07T16:01:41.157 回答