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

Switch Hydrogen test runner from Jest to Vitest #670

Open
Tracked by #666
jplhomer opened this issue Feb 15, 2022 · 9 comments
Open
Tracked by #666

Switch Hydrogen test runner from Jest to Vitest #670

jplhomer opened this issue Feb 15, 2022 · 9 comments

Comments

@jplhomer
Copy link
Contributor

No description provided.

@frehner
Copy link
Contributor

frehner commented Apr 19, 2022

Adding Vitest for hydrogen-ui, so we're on that from the start. As we migrate components over, we can translate the existing Jest tests to Vitest.

@mrkldshv
Copy link
Contributor

Hey! I see that all tests in hydrogen-ui package have been migrated to vitest. Should we start converting tests in hydrogen package? Are there any prerequisites or blockers?

@blittle
Copy link
Contributor

blittle commented Jul 1, 2022

@mrkldshv I don't think so, just the time and bandwidth to do it.

@mrkldshv
Copy link
Contributor

mrkldshv commented Jul 1, 2022

Right, I see. Can I start working on this?

@frehner
Copy link
Contributor

frehner commented Jul 1, 2022

@mrkldshv Let's hold off for a little bit - there's still some discussion about the future of the hydrogen-ui package that we need to figure out.

I'll respond in this thread with more details once we have made the decision.

Thanks for your enthusiasm! One thing we could try to figure out now / very soon is if we could set it up in a way to slowly migrate the existing tests from Jest to Vitest in-place.

Maybe what we could do is create new Vitest files with a different extension like .vitest.ts and then configure Vitest to only test files with that extension and tell Jest to ignore tests with that extension.

With the goal being that we don't have to do all the tests as once, and instead migrate them over in smaller chunks. Then when it's done we can rename the .vitest.ts -> .test.ts and remove Jest.

Thoughts? Other ideas?

@mrkldshv
Copy link
Contributor

mrkldshv commented Jul 1, 2022

Thanks for reply! I was thinking to start migrating tests gradually, and having separate file extension sounds like a good idea. From what I understand we need to wait for the decision concerning hydrogen-ui package, so I'll be waiting for any updates here.

@frehner
Copy link
Contributor

frehner commented Jul 1, 2022

I'll see if it's useful / possible to setup that situation with Vitest in the existing repo, and if so, we can at least get started there and migrate tests, regardless of the outcome about hydrogen-ui.

@frehner frehner self-assigned this Jul 1, 2022
@mrkldshv
Copy link
Contributor

mrkldshv commented Jul 1, 2022

That'd be great! Thanks!

@frehner
Copy link
Contributor

frehner commented Aug 20, 2022

To provide an update here, as promised above

Let's hold off for a little bit - there's still some discussion about the future of the hydrogen-ui package that we need to figure out.

I'll respond in this thread with more details once we have made the decision.

We're full-speed ahead on hydrogen-ui now 🙂

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

4 participants