【发布时间】:2019-07-11 00:16:16
【问题描述】:
如何使用 mocha/chai 检查元素 cssProperty 是否为 x?
这就是我想要的:
expect(accountText.getCssProperty('color')).to.be('#fff');
这是我得到的错误信息:
expect(...).to.be is not a function
【问题讨论】:
-
试试等于:
expect(accountText.getCssProperty('color')).to.equal('#fff'); -
看起来像 getCssProperty 来查看选择器的值。这有效:expect(accountText.value.getCssProperty('color')).to.be('#fff');
标签: javascript mocha.js chai