Kou*_*nha 2 javascript mocha.js should.js
想检查一个字符串是否存在于数组中someArray.should.contain('str'),但是我找不到对此进行的否定情况检查.
someArray.should.contain('str')
Tro*_*ott 7
使用.not应该工作:someArray.should.not.contain('str')
.not
someArray.should.not.contain('str')
在should.js自述中没有提到.contain().因此,如果简单插入.not不起作用,请使用.containEql().
should.js
.contain()
.containEql()
归档时间:
11 年,4 月 前
查看次数:
2324 次
最近记录:
9 年,3 月 前