【发布时间】:2018-02-16 15:10:45
【问题描述】:
我有一个基于 Process.env 变量加载的 DIV,任何人都可以为我指明如何测试本节的方向吗?
{ process.env.STYLE === 'RNR' &&
<div className="price-option">
<span>$ <input type="text" ref="minInput" placeholder="Min" defaultValue={minValue} /></span>
<span>{i18n.l('to ')} $ <input type="text" ref="maxInput" defaultValue={maxValue} placeholder="Max" /></span>
<button onClick = {this.filterPrice.bind(this)} ref={(node) => { this.minMaxfilter = node }} >{i18n.l('Go')}</button>
</div>
}
【问题讨论】:
标签: reactjs mocha.js chai enzyme