stryker-js icon indicating copy to clipboard operation
stryker-js copied to clipboard

StrykerJS + vitest

Open lbenie opened this issue 3 years ago • 4 comments
trafficstars

Is your feature request related to a problem? Please describe. I've been slowly migrating my projects to use vite as the config bundler. With that they recently introduced vitest which allows to share a common transformation pipeline during dev, build, and test time. I don't believe with the current mutators that it would work with vitest as there are no runners for vitest.

Describe the solution you'd like I don't know if it would be feasible to work with the vitest core dev team and allow a stryker-js configuration using vitest?

Describe alternatives you've considered unfortunately I don't see any

Additional context none

lbenie avatar Mar 25 '22 15:03 lbenie

Any updates for this?

lbenie avatar Jun 22 '22 23:06 lbenie

No, it is on the roadmap, but it will take some time to implement. Feel free to implement this feature if you want it to work sooner 😅

nicojs avatar Jun 26 '22 13:06 nicojs

@nicojs sure I could take a stab at it, I'd probably need some context on how to build it, could you point me in that direction?

lbenie avatar Jun 27 '22 19:06 lbenie

Sure! I would love that! 💜

Instead of explaining it here inside this issue, I'm adding a big slap of documentation into our "create a plugin" guide:

https://github.com/stryker-mutator/stryker-js/pull/3607

Please let me know what I can do to help! (you can also join our slack).

If you want to contribute this plugin to the StrykerJS monorepo, you can look at our CONTRIBUTING.md to help you get started with our environment.

nicojs avatar Jun 28 '22 15:06 nicojs

We are working on possible solution! Please help us and upvote this issue https://github.com/vitest-dev/vitest/issues/2167

TeunLamers avatar Oct 18 '22 12:10 TeunLamers

Will be great to have this support, love mutation testing and your work here on Stryker, thanks.

silverbackdan avatar Dec 12 '22 18:12 silverbackdan

Hey @lbenie ✋ do you are working on this? I would love to help

rqbazan avatar Dec 22 '22 19:12 rqbazan

Hey @lbenie ✋ do you are working on this? I would love to help

Hey man, no unfortunately I haven't had time to work on this. Seems like the stryker team took a jab at it though

lbenie avatar Jan 12 '23 22:01 lbenie

@rqbazan I think @TeunLamers looks like the person to ping if you're looking to help, looks like they were working on a prototype in October last year.

silverbackdan avatar Jan 28 '23 16:01 silverbackdan

Yes. @TeunLamers was a graduate student implementing Svelte support. Which is almost implemented (see PR). Unfortunately he had to drop Vitest support, because it was to much work to finish during his graduation assignment period. We still have support planned, I hope we can start on it in February

nicojs avatar Jan 29 '23 18:01 nicojs

Thanks for the update @nicojs :) Good luck @TeunLamers with your work for graduation

silverbackdan avatar Jan 29 '23 18:01 silverbackdan

Hi there,

Any updates on vite support? Planning to implement it early on in a new project.

Thanks! :)

SemSnel avatar Apr 12 '23 07:04 SemSnel

Hey, you should keep an eye on this pull request for vitest support! :)

TeunLamers avatar Apr 12 '23 07:04 TeunLamers

@TeunLamers Thank you! Does this also work with typescript? Hope your graduation went well! :)

SemSnel avatar Apr 12 '23 08:04 SemSnel

I succesfully graduated in late January and recently started working in mid March! Depending on your stack it will most likely work.

The Vitest runner should work with Typescript projects because Typescript support is already build in StrykerJS. For Svelte projects Typescript does not work at the moment but is planned at a later date. This Pull request needs te be merged first for Svelte integration and Typescript support comes at a later date after that!

TeunLamers avatar Apr 12 '23 09:04 TeunLamers

@TeunLamers Good to hear! I also need to graduate this year. ^^

Even though I really like Svelte, I want to keep the Tech Stack more average with Vue, Storybook and .NET as backend. Not sure if or when we need to scale this project, so this setup will be probably the best for us.

SemSnel avatar Apr 12 '23 09:04 SemSnel

@SemSnel Good luck with your graduation! ^^

That seems like a solid stack! If you choose a different test runner StrykerJS will for sure work with Vue and Typescript. I have no clue how good testrunner integrations are with Vite besides Vitest so it might be worth the wait.

TeunLamers avatar Apr 12 '23 09:04 TeunLamers

Hey! I've seen that the PR for adding support for vitest has been merged. How is the status of this issue? Thanks!

DanielRamosAcosta avatar May 30 '23 10:05 DanielRamosAcosta

@DanielRamosAcosta how cool! I will try to implement and report back

silverbackdan avatar May 31 '23 10:05 silverbackdan

Thanks, everyone, for your patients.

🎉 The vitest runner is released: in v7.0.0

See https://github.com/stryker-mutator/stryker-js/releases/tag/v7.0.0

For the docs, see https://stryker-mutator.io/docs/stryker-js/vitest-runner/

If you have any issues, please let us know. A blog article about this release will be published following Monday.

nicojs avatar Jun 02 '23 17:06 nicojs

Amazing news, I'll see about adding this into a project :)

silverbackdan avatar Jun 03 '23 15:06 silverbackdan

Blog article here: https://stryker-mutator.io/blog/announcing-stryker-js-7/

nicojs avatar Jun 05 '23 10:06 nicojs