在 Protractor 引用配置中,有 untrackOutstandingTimeouts
setting提到:
// 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
?
最佳答案
跟踪未完成的超时,以便 Protractor 错误可以报告它们。如果关闭此功能,您将不会在错误中获得超时信息。
你可能需要关闭它,但是,如果你装饰你的 $timeout
对象(无论出于什么原因你需要装饰它),因为 Protractor 也装饰同一个对象,你不会'不会在需要时看到您对其所做的更改。
这是添加的here , 应用户要求。
关于javascript - Protractor 中的 untrackOutstandingTimeouts 设置是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39473600/