launchdarkly / jest-launchdarkly-mock

Easily unit test LaunchDarkly feature flagged components with jest
Apache License 2.0
25 stars 19 forks source link

Support for Vitest test runner #56

Open vcapretz opened 1 year ago

vcapretz commented 1 year ago

I see this library is very specific to jest, do you plan on supporting Vitest?

I guess one could either have a new lib vitest-launchdarkly-mock or a more generic one, wdyt?

vcapretz commented 1 year ago

btw, the API looks really similar, we are planning to migrate to Vitest and I ported over this lib to our monorepo, I installed all the lodash dependencies plus launchdarkly-js-client-sdk and essentially renamed everything jest. to vi. and it works, but ideally we would use this lib

louis-launchdarkly commented 1 year ago

Hello @vcapretz, thank you for the question, and sorry for the late reply. Currently, there is no plan for supporting Vitest. If there is a way to refactor to a more generic one to support multiple testing frameworks, that would be nice.

louis-launchdarkly commented 1 year ago

Hello @vcapretz, as a follow-up, while there is no ETA yet, I have discussed with the JS engineer on this, it would be good to eventually support vitest as a separate package. I will mark this as an enhancement and track this internally.

Filed internally as 207468.

bohdanbirdie commented 1 year ago

@vcapretz @louis-launchdarkly I hope this helps https://github.com/bohdanbirdie/vitest-launchdarkly-mock

I'm planning to use this for my needs, feel free to suggest changes