Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/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
Javascript 量角器中的未跟踪超时设置是什么?_Javascript_Angularjs_Testing_Automation_Protractor - Fatal编程技术网

Javascript 量角器中的未跟踪超时设置是什么?

Javascript 量角器中的未跟踪超时设置是什么?,javascript,angularjs,testing,automation,protractor,Javascript,Angularjs,Testing,Automation,Protractor,在量角器参考配置中,提到了: // Protractor will track outstanding $timeouts by default, and report them in // the error message if Protractor fails to synchronize with Angular in time. // In order to do this Protractor needs to decorate $timeout. // CAUTION: If

在量角器参考配置中,提到了:

// Protractor will track outstanding $timeouts by default, and report them in 
// the error message if Protractor fails to synchronize with Angular in time. 
// In order to do this Protractor needs to decorate $timeout. 
// CAUTION: If your app decorates $timeout, you must turn on this flag. This 
// is false by default.
untrackOutstandingTimeouts: false,

我从未见过有人改变设置。设置的实际用途是什么?我应该在什么时候将其设置为
true

untrackOutstandingTimeouts:true表示$timeout,也可能表示$interval(我不确定)


跟踪未完成的超时,以便量角器错误可以报告它们。如果关闭此选项,则不会在错误中获取超时信息

但是,如果您装饰
$timeout
对象(无论出于何种原因,您需要装饰它),您可能需要关闭它,因为量角器也装饰同一个对象,并且您不会在需要时看到对它所做的更改

这是根据用户请求添加的。

这是问题的官方答案。这和@Vlad的答案是一样的