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

Contribute to jest-codemods #1

Open
paularmstrong opened this issue Dec 21, 2016 · 7 comments
Open

Contribute to jest-codemods #1

paularmstrong opened this issue Dec 21, 2016 · 7 comments

Comments

@paularmstrong
Copy link

Would you be open to adding this to jest-codemods? It has chai assert transformations, but not chai expect or should.

@AlexJuarez
Copy link
Owner

@paularmstrong Sure. The transform converts chai chain expressions & assertions, it looks like the one in use only does assertions. What parts do you want me to split out?

@skovhus
Copy link

skovhus commented Jan 24, 2017

Great work on this codemod!

Yeah, it might make sense to join forces. The part handling chai expect and should would be a great addition to Jest codemods.

Are you up for doing a PR? Or are you ok with me lifting functionality over to jest codemods?

@AlexJuarez
Copy link
Owner

@skovhus It would be my pleasure to contribute this back to jest codemods. I'll take a stab at a PR, and feel free to take any functionality you like.

@skovhus
Copy link

skovhus commented Feb 27, 2017

@AlexJuarez let me know if you started on this, else I'll work on this next week. : )

@AlexJuarez
Copy link
Owner

@skovhus I looked into adding it however the conventions between the two code bases are fairly different and I wasn't sure how much you would want me to adapt this code to your preferences.

@skovhus
Copy link

skovhus commented Apr 14, 2017

This has been released as https://github.com/skovhus/jest-codemods 0.9.0! 🍔 🍟

Thanks @AlexJuarez for your work! Based on your work the codemod now also supports:

  • warnings for unsupported features
  • removing chai imports and requires
  • a few bug fixes relates to length, to.be.empty, toBeInstanceOf
  • use native Jest methods instead of Jasmine
  • support extensible, sealed, frozen, lessThan, finite

Do you want to link to Jest-Codemods?

@AlexJuarez
Copy link
Owner

This is awesome, yah I'll update the old repository to point to jest-codemods.

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