Awesome
chai-to-assert
A jscodeshift codemod that transforms from chai to Node assert.
USAGE
$ npm install -g jscodeshift
$ npm install chai-to-assert
$ jscodeshift -t node_modules/chai-to-assert/lib/bdd-api-to-node-assert.js target-dir
FEATURES
BDD Style API
expect
should
properties
.ok
.true
.false
.null
.undefined
.exist
.NaN
.finite
.extensible
.sealed
.frozen
chainable methods
.a(type)
(aliasan
) (only for primitives and null).lengthOf(value)
(alias.length
)
methods
.equal(value)
(alias.equals
,.eq
).eql(value)
(alias.eqls
).match(regexp)
(alias.matches
).above(value)
(alias.gt
,.greaterThan
).least(value)
(alias.gte
).below(value)
(alias.lt
,.lessThan
).most(value)
(alias.lte
).within(start, finish)
.closeTo(expected, delta)
(alias.approximately
).property(name, [value])
.ownProperty(name, [value])
(alias.haveOwnProperty
).ownPropertyDescriptor(name, [descriptor])
(alias.haveOwnPropertyDescriptor
).instanceof(constructor)
(alias.instanceOf
).throw([errorLike], [errMsgMatcher])
(alias.throws
,.Throw
).respondTo(method)
(alias.respondsTo
).satisfy(predicate)
(alias.satisfies
).string(string)
.oneOf(list)
AUTHOR
LICENSE
Licensed under the MIT license.