我使用should.js来进行断言,但是,我得到的JSHint警告是:
argObject.exists(dummyString1).should.be.true;
argObject.exists(dummyString2).should.be.true;是投掷
Expected an assignment or function call and instead saw an expression.对于第一行之后的每一行。
发布于 2015-05-13 21:16:35
我所寻求的解决方案是避免使用这种语法(反正我并不太喜欢它),并将断言重写为:
argObject.exists(dummyString1).should.equal(true);
argObject.exists(dummyString2).should.equal(false);https://stackoverflow.com/questions/30225046
复制相似问题