jest-expect-json

时间:2021-02-18 22:24:44
【文件属性】:
文件名称:jest-expect-json
文件大小:6KB
文件格式:ZIP
更新时间:2021-02-18 22:24:44
TypeScript 开玩笑期望JSON 您是否需要针对json字符串测试对象? 开玩笑地期望没有您应得的所有json匹配器吗? 使用该json块,您的提取测试看起来真的很脆弱吗? 现在将jest-expect-json导入您的测试中! 建立在之上,`jest-expect-json为jest添加了有用的json测试! 设置 将jest-expect-json添加到您的测试文件中,如下所示: import 'jest-expect-json' ; 方法 jsonMatching jsonMatching分析与使用JSON字符串expect 。 fetch ( 'url' , { method : 'POST' , body : '{"some": "DATA", "more": "DATA!"}' , } ) expect ( fetch ) . toBeCalledWith ( 'url' ,
【文件预览】:
jest-expect-json-master
----.eslintrc(713B)
----.github()
--------workflows()
----src()
--------expect-json.test.ts(782B)
--------expect-json.ts(1KB)
----.babelrc(139B)
----.npmignore(165B)
----tsconfig.json(239B)
----LICENSE(1KB)
----README.md(1KB)
----.editorconfig(161B)
----.gitignore(170B)
----.eslintignore(26B)
----package.json(1KB)

网友评论