Vuex状态的断言-React开发

时间:2021-05-27 15:37:24
【文件属性】:
文件名称:Vuex状态的断言-React开发
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-27 15:37:24
React React Testing 对Vuex状态示例的vuex-assert断言只需将断言添加到Vuex模块中即可。 // modules / users.js从'vuex-assert'导入{布尔值,数字,字符串,对象,数组}导出默认{st vuex-assert对Vuex状态的断言示例只需将断言添加到Vuex模块中即可。 // modules / users.js从'vuex-assert'导入{布尔值,数字,字符串,对象,数组}导出默认{状态:{isLoading:false,错误:null,用户:[]},断言:{isLoading:布尔值,错误:object({代码:数字,消息:字符串})。可选,用户:array(object({id:number.assert(id => id> 0,'id应该是无符号的'),na
【文件预览】:
vuex-assert-master
----.gitignore(44B)
----package.json(2KB)
----tslint.json(38B)
----src()
--------formatter.ts(1KB)
--------plugin.ts(1KB)
--------index.ts(79B)
--------assertion.ts(725B)
--------utils.ts(757B)
--------helpers.ts(3KB)
----.travis.yml(147B)
----LICENSE(1KB)
----tsconfig.json(350B)
----scripts()
--------webpack.config.test.js(624B)
--------rollup.config.js(984B)
----README.md(2KB)
----testem.yml(55B)
----test()
--------formatter.ts(928B)
--------tsconfig.json(281B)
--------index.ts(6KB)
--------fixtures()

网友评论