【文件属性】:
文件名称:jest-to-be-typed:玩笑匹配器,可让您测试期望的值类型
文件大小:72KB
文件格式:ZIP
更新时间:2021-05-14 00:22:00
jest tdd matcher typeof type
:party_popper: 开玩笑
玩笑匹配器,可让您测试期望的值类型。
:wrench: 安装
与npm
npm i jest-to-be-typed
带纱
yarn add jest-to-be-typed
:package: 设置
笑话> v24
将jest-to-be-typed的Jest添加到Jest setupFilesAfterEnv配置中。
" jest " : {
" setupFilesAfterEnv " : [ " jest-to-be-typed " ]
}
笑话<v23
" jest " : {
" setupTestFrameworkScriptFile " : " jest-to-be-typed "
}
或者
只需导入toBeTyped
// *.test.js
import toBeTyped from 'jest-to-be-typed'
expect . extend ( toBe
【文件预览】:
jest-to-be-typed-master
----package.json(929B)
----.github()
--------dependabot.yml(501B)
--------ISSUE_TEMPLATE()
----test()
--------util.test.js(2KB)
--------jest-to-be-typed.test.js(2KB)
----.prettierrc(74B)
----jest.config.js(483B)
----LICENSE(1KB)
----package-lock.json(297KB)
----CONTRIBUTING.md(268B)
----src()
--------utils.js(531B)
--------index.js(2KB)
--------constants.js(70B)
----.npmignore(4B)
----.gitignore(17B)
----README.md(2KB)
----babel.config.js(154B)