gpt4 book ai didi

javascript - Ember 的 titleBinding on a link-to helper 破坏了 Jasmine 测试

转载 作者:行者123 更新时间:2023-11-28 01:35:58 25 4
gpt4 key购买 nike

我目前正在将 Ember 应用程序升级到 Ember 1.3.0 稳定版。我在 Jasmine 测试中遇到以下问题:

Error: Assertion Failed: You must use Ember.set() to access this property (of [object Object])
at new Error (native)
at Error.Ember.Error (http://localhost:8888/assets/rake-ember.js?body=true:837:23)
at Object.Ember.assert (http://localhost:8888/assets/rake-ember.js?body=true:79:13)
at Object.Ember.MANDATORY_SETTER_FUNCTION [as keywords] (http://localhost:8888/assets/rake-ember.js?body=true:3446:13)
at withHelper (http://localhost:8888/assets/rake-ember.js?body=true:27796:40)
at Object.eval (eval at <anonymous> (http://localhost:8888/assets/rake-handlebars.js?body=true:1500:23), <anonymous>:88:28)
at Handlebars.VM.template (http://localhost:8888/assets/rake-handlebars.js?body=true:2214:33)
at renderPartial (http://localhost:8888/assets/rake-ember.js?body=true:29502:7)
at partialHelper (http://localhost:8888/assets/rake-ember.js?body=true:29479:9)
at Object.eval (eval at <anonymous> (http://localhost:8888/assets/rake-handlebars.js?body=true:1500:23), <anonymous>:54:99)

这似乎发生在以下代码中:


{{#link-to 'someroute' somemodel titleBinding="view.someproperty"}} 您好! {{/链接到}}

当删除它时,我们已将其范围缩小到上面的 titleBinding 属性 - 然后我们的测试可以继续运行。有人对此有任何见解吗?

最佳答案

尝试使用新的绑定(bind)语法title=somepropery

关于javascript - Ember 的 titleBinding on a link-to helper 破坏了 Jasmine 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21538668/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com