expect-js-to-assert
v0.2.0
Published
A jscodeshift codemod that transforms from expect.js to Node assert
Downloads
4
Maintainers
Readme
expect-js-to-assert
A jscodeshift codemod that transforms from Automattic/expect.js to Node assert.
USAGE
$ npm install -g jscodeshift
$ npm install expect-js-to-assert
$ jscodeshift -t node_modules/expect-js-to-assert/transform.js target-dir
FEATURES
matchers
- [x]
.ok()
- [x]
.be(value)
(alias.equal
) - [x]
.eql(value)
- [ ]
.a(type)
(alias.an
) - [x]
.match(regexp)
- [x]
.contain(needle)
- [x]
.length(size)
- [ ]
.empty()
- [ ]
.property(name, [value])
- [ ]
.key(name)
- [ ]
.keys(...name)
- [x]
.throw([errorMatcher])
(alias.throwException
,.throwError
) - [x]
.within(start, finish)
- [x]
.above(value)
(alias.greaterThan
) - [x]
.below(value)
(alias.lessThan
) - [ ]
.fail([reason])
chains
- [x]
.not
- [ ]
.withArgs(...args)
AUTHOR
CONTRIBUTORS
LICENSE
Licensed under the MIT license.