Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any tool to migrate should/expect code to power-assert? #74

Closed
atian25 opened this issue Jan 18, 2017 · 7 comments
Closed

any tool to migrate should/expect code to power-assert? #74

atian25 opened this issue Jan 18, 2017 · 7 comments

Comments

@atian25
Copy link

atian25 commented Jan 18, 2017

power-assert is amazing

@watilde
Copy link
Member

watilde commented Jan 18, 2017

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
Copy link
Author

atian25 commented Jan 18, 2017

but should is complex, such as:

  • should.be.ok(someVar)
  • someKey.should.not.exist()
  • someKey.should.eql('aaa')
  • should.throw(() => {})

@watilde
Copy link
Member

watilde commented Jan 18, 2017

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
Copy link
Member

twada commented Jan 18, 2017

@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 ;)

@atian25
Copy link
Author

atian25 commented Mar 24, 2017

https://github.com/node-modules/should2assert

@twada
Copy link
Member

twada commented Mar 29, 2017

@atian25 Wow great! Now we have migration paths from both should.js and chai!

@twada twada closed this as completed in f335a63 Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants