-
Notifications
You must be signed in to change notification settings - Fork 1.4k
tape/tap transition guide #178
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
Comments
I looked into this a while ago. The problem is that tape already have aliases for equal AVA methods, but with different behavior. Mainly, we have |
@sindresorhus ahh understood, this makes sense. Can close. |
I'll keep it open as I want to do a transition guide, maybe even an automated script (that would be cool!). |
Those could be written as codemods btw https://github.com/facebook/jscodeshift |
@nvartolomei Yup, that would be rad. I've been thinking about this for a while. Opened a separate issue → #644. |
Also see discussion in #445. |
I just switched from tap/tape to ava, which benifit me reducing the test time from dozens of minutes to around 3 minutes. ava is great. when I made the transition, the main pain to me is the following 2 changes:
the reason I found this issue is because I have the same idea with @timoxley . but after I saw the explains from @sindresorhus , I agree there will not easy to switch between ava and tap/tape. (not like switch between tap and tape, which is only need to change one line) so my sugestion is: at least we alias those two methods(equal & is, ok & truthy), because they have the same behaviour, and will let developer switch more easier, without cause any confusing. |
@zixia We're actually very close to having an automatic migration script: avajs/ava-codemods#28 😃 |
@sindresorhus ah, cool. it will help much. thanks! |
If we can get |
Would make migrating from tape easier if AVA & tape shared the same API.
Below is the full list of
tape
apis that don't exist in AVA. Most of these would only require a simple alias e.g.Test.prototype.deepEqual = Test.prototype.same
Though it's possible there's benefit in divorcing the tape API entirely & just keeping the current, simpler API. For example, not sure if it was ever a good idea to support both
deepEquals
anddeepEqual
other than to encourage bikeshedding within a team about which one to use.Related to #96
The text was updated successfully, but these errors were encountered: