sinon chai:使用Sinon.JS模拟框架的断言扩展Chai 源码

上传:random14613 浏览: 24 推荐: 0 文件:ZIP 大小:47.54KB 上传时间:2021-02-19 10:22:44 版权申诉
Sinon.JS的柴断言 Sinon-Chai提供了一组自定义断言,以便通过断言库使用间谍,存根和框架。 通过Sinon.JS的所有强大工具,您可以获得Chai的所有好处。 而不是使用Sinon.JS的断言: sinon . assert . calledWith ( mySpy , "foo" ) ; 或笨拙地尝试在间谍属性上使用Chai的should或expect接口: mySpy . calledWith ( "foo" ) . should . be . ok ; expect ( mySpy . calledWith ( "foo" ) ) . to . be . ok ;
上传资源
用户评论