Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角度2β13测试中的允诺错误_Angular - Fatal编程技术网

Angular 角度2β13测试中的允诺错误

Angular 角度2β13测试中的允诺错误,angular,Angular,我已经更新到angular2 beta13,当运行单元测试时,我得到以下错误: 错误{行:543,源URL: '', 堆栈: “我发誓@ 拒绝@ 提交主题 测试通过,所以这个错误在框架中的某个地方被处理 我成功地将错误定位到此测试: it('tries to identify the new url', () => { (<jasmine.Spy>mockRouter.recognize).and.returnValue(Promise.

我已经更新到angular2 beta13,当运行单元测试时,我得到以下错误:

错误{行:543,源URL: '', 堆栈: “我发誓@ 拒绝@ 提交主题

测试通过,所以这个错误在框架中的某个地方被处理

我成功地将错误定位到此测试:

        it('tries to identify the new url', () => {
            (<jasmine.Spy>mockRouter.recognize).and.returnValue(Promise.reject('someReason'));

            subject();

            expect(mockRouter.recognize).toHaveBeenCalledWith(newUrl);
        });
it('尝试识别新url',()=>{
(mockRouter.recognize)和.returnValue(Promise.reject('someReason');
主语();
期望(mockRouter.recognize).tohavencalledwith(newUrl);
});

我在我的项目中有什么需要做的吗?

你能给我们一些关于触发此错误的代码的提示吗?谢谢!我已经找到了一个复制此错误的测试。