any tool to migrate `should/expect` code to `power-assert`?
atian25 opened this issue ยท 7 comments
atian25 commented
power-assert is amazing
watilde commented
Hello! No, we don't have it, but it would be not hard to do manually since power-assert has only one method assert
.
atian25 commented
but should
is complex, such as:
should.be.ok(someVar)
someKey.should.not.exist()
someKey.should.eql('aaa')
should.throw(() => {})
watilde commented
Yeah, it's complicated and multifunctional indeed. Well, the behaviour of the should/expect
could depend on the tools/its syntax design, and that's why I think the migration topic could be out of the scope of this project, IMO.
twada commented
@atian25 @watilde Thank you for your feature request! It's good to have migration path to assert.
Just begun chai-to-assert, a jscodeshift codemod that transforms from chai to assert. Highly experimental ;)