在 angular cli projet 中进行 运行 e2e 测试时出现超时错误
Timeout error when running e2e test in angular cli projet
我开始在 angular cli 项目
中使用量角器和 jasmine 进行 e2e 测试
describe('my-web-client App', function() {
let page: myWebClientPage;
beforeEach((done) => {
page = new myWebClientPage();
});
it('should show menubar', () => {
page.navigateTo();
expect( page.getAppMenubar().isPresent() ).toEqual(true); // getAppMenubar() return element(by.css('app-menubar'));
});
});
但即使进行了简单的测试,我也收到了以下错误
您指定了 done
回调但从未执行它,并且根据 jasmine 文档:
... spec will not start until the done
function is called in the call
to beforeEach
above. And this spec will not complete until its done
is
called.
你可以省略它:
beforeEach(() => {
page = new myWebClientPage();
});
我开始在 angular cli 项目
中使用量角器和 jasmine 进行 e2e 测试describe('my-web-client App', function() {
let page: myWebClientPage;
beforeEach((done) => {
page = new myWebClientPage();
});
it('should show menubar', () => {
page.navigateTo();
expect( page.getAppMenubar().isPresent() ).toEqual(true); // getAppMenubar() return element(by.css('app-menubar'));
});
});
但即使进行了简单的测试,我也收到了以下错误
您指定了 done
回调但从未执行它,并且根据 jasmine 文档:
... spec will not start until the
done
function is called in the call tobeforeEach
above. And this spec will not complete until itsdone
is called.
你可以省略它:
beforeEach(() => {
page = new myWebClientPage();
});