我已更新到angular2 beta13,当运行单元测试时,我收到以下错误:
错误{line:543,sourceURL: 'http://localhost:9876/base/node_modules/angular2/bundles/angular2-polyfills.js?515e45a0cf377eb121bfd453f38a79b8d69bce25', 堆: “resolvePromise @ http://localhost:9876/base/node_modules/angular2/bundles/angular2-polyfills.js?515e45a0cf377eb121bfd453f38a79b8d69bce25:543:76 拒绝@ http://localhost:9876/base/node_modules/angular2/bundles/angular2-polyfills.js?515e45a0cf377eb121bfd453f38a79b8d69bce25:599:35 提交主题
测试通过,因此在框架中的某处处理此错误。
我设法将错误指向此测试:
it('tries to identify the new url', () => {
(<jasmine.Spy>mockRouter.recognize).and.returnValue(Promise.reject('someReason'));
subject();
expect(mockRouter.recognize).toHaveBeenCalledWith(newUrl);
});
我的项目中有什么需要做的吗?