hamjest-sinon:否则为Hamjest的匹配者

时间:2024-06-15 04:45:22
【文件属性】:

文件名称:hamjest-sinon:否则为Hamjest的匹配者

文件大小:13KB

文件格式:ZIP

更新时间:2024-06-15 04:45:22

JavaScript

安装 npm install hamjest sinon hamjest - sinon -- save - dev 用法 通过require模块将sinon匹配器添加到hamjest中 const __ = require ( 'hamjest' ) ; // auto extend hamjest require ( 'hamjest-sinon' ) ; // or require ( 'hamjest-sinon' ) . extendHamjest ( __ ) ; // use matcher from hamjest __ . assertThat ( stub , __ . wasCalled ( ) ) ; 锡诺火柴者 Sinon匹配器用于测试函数调用。 用sinon存根或间谍替换函数,并使用这些匹配器通过代码声明函数的调用。 wasCalled(valueOrMat


【文件预览】:
hamjest-sinon-master
----.eslintrc(384B)
----package.json(1KB)
----@types()
--------index.d.ts(686B)
--------typeTest.ts(724B)
----.github()
--------workflows()
----LICENSE(1KB)
----src()
--------was-called-with.js(2KB)
--------index.js(512B)
--------was-called.spec.js(3KB)
--------was-called-with.spec.js(3KB)
--------was-called-in-order.js(3KB)
--------SinonMatcher.js(1KB)
--------index.spec.js(681B)
--------SinonMatcher.spec.js(2KB)
--------was-called.js(1KB)
--------was-called-in-order.spec.js(3KB)
----.gitignore(2KB)
----README.md(3KB)

网友评论