【文件属性】:
文件名称:promise-assert:内联 Promise 断言库
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-19 07:07:28
JavaScript
承诺-断言
内联Promise断言库。
安装
$ npm install promise-assert
用法
const pa = require ( 'promise-assert' )
Promise . resolve ( 1337 )
. then ( pa . equal ( 1337 ) )
// => ok
应用程序接口
pa()
Promise . resolve ( false )
. then ( pa ( ) )
// => AssertionError
确定()
pa.ok() == pa()
pa.equal()
Promise . resolve ( 'hello' )
. then ( pa . equal ( 'hello' ) )
// => ok
执照
【文件预览】:
promise-assert-master
----.travis.yml(164B)
----index.js(874B)
----test.js(894B)
----package.json(615B)
----LICENSE(1KB)
----.gitignore(164B)
----README.md(1KB)