Ember Qunit验收测试用例无法进入应用程序主页

时间:2018-09-21 13:37:50

标签: javascript unit-testing testing ember.js qunit

1)我正在将Qunit用于我的主页或着陆页的验收测试用例。
2)我在application.js路由中使用了所有主页逻辑。
3)我创建了应用程序测试文件。下面是代码。

    let backgroundLayer  = CALayer()
    backgroundLayer.frame  = layer.bounds
    backgroundLayer.borderColor = UIColor.lightGray.cgColor
    backgroundLayer.borderWidth = 1.0
    layer.insertSublayer(backgroundLayer, at: 0)

4)当我运行测试用例时,它失败了。以下是发生的错误。

import { test } from 'qunit';
import moduleForAcceptance from 'landingui/tests/helpers/module-for-acceptance';

moduleForAcceptance('Acceptance | application');

test('visiting /', function (assert) {
    visit('/');

    andThen(function () {
        assert.equal(currentURL(), '/');
    });
});

请帮助解决此问题。

0 个答案:

没有答案
相关问题