-
Notifications
You must be signed in to change notification settings - Fork 91
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
Consider compat lib for seamless ScalaTest migration #112
Comments
Thank you for taking the time to implement and share your experiments with building a ScalaTest compatibility API! I think this is an important discussion and I suspect several people are interested in using such a compatibility API because it would significantly reduce the cost of migration, it has at least come up several times on Gitter. While I agree it's desirable to reduce the migration cost for ScalaTest users, I am still on the fence about including something like this in MUnit because it would mean that users face the choice of deciding what syntax they want to use:
Do you have suggestions for how we can ensure this API is only used for the initial evaluation and not permanently after the eventual switch? |
@olafurpg I share your point of view and see possible win-win alternatives to shipping anything inside Munit:
The reasoning behind option 2 is that the effort and cost of coming with a comprehensive compat library might be substantial, while a simple library might not be of real use and disappointing in the long run. Having some simple seeds to copy, like |
Sounds good. I'm OK with linking to example code that users can copy-paste. Do you have a preference between writing the code examples on Scastie or in the MUnit website? All of the code examples on the website are typechecked. I'm OK with adding a dependency on ScalaTest in the I primarily want to avoid publishing artifacts with a ScalaTest since that would mean we take on the burden of maintaining a compatibility layer for ScalaTest, which as you say is hard to deliver 100%. |
Closing this as "wontfix". The ScalaTest migration guide has been expanded with more details https://scalameta.org/munit/docs/scalatest.html thanks to the contribution in #166 and #164 Additionally, I'm open to merge a PR based on the work in #191 adding Scalafix migration rewrites from ScalaTest to MUnit. |
Hi @olafurpg ,
I just found about Munit at the ScalaLove conf and decided to give it a go in one of my projects using ScalaTest and
WordSpec
so far.In due course, I have found a nice way to migrate to MUnit without rewriting a single line of my tests, except of course of changing class dependency to
munit.FunSuite
. That would make it easier for many people to try MUnit first and then eventually switch.The resulting compatibility trait and an example test is presented here https://gist.github.com/arturopala/4cfd20de97006031329a946f08c54f20
Do you think it would make sense to have such a compatibility tool in a separate project?
Cheers, Artur
The text was updated successfully, but these errors were encountered: