-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add sinon codemod #242
Add sinon codemod #242
Conversation
This is awesome. Would you mind updating the README. I also believe we have a warning if we see sinon mocks, that should be changed to suggest using the transformer. Depending on the stability of it we might consider including it as a default transformer. |
@skovhus updated both README + warning |
@@ -10,7 +10,8 @@ Codemods that simplify migrating JavaScript and TypeScript test files from | |||
[Mocha](https://github.com/mochajs/mocha), | |||
[proxyquire](https://github.com/thlorenz/proxyquire), | |||
[Should.js](https://github.com/tj/should.js/), | |||
[Tape](https://github.com/substack/tape) | |||
[Tape](https://github.com/substack/tape), | |||
[Sinon](https://github.com/sinonjs/), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update the “ Usage (jscodeshift)” section?
we should also add sinon to the cli. Let me know if you need any help doing that. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! Thanks for fixing this. 👏
+1 Great stuff! |
This is the first pass at a sinon codemod - see relevant thread. We've used this on our codebase to help migrate ~80% (1800+ files) of sinon use cases.
Thanks to @jordalgo for the initial POC.
cc @lencioni @danbeam