cva
cva copied to clipboard
Add Tests for README Examples
Is your feature request related to a problem? Please describe.
It's all well and good recommending uses for cva
but it would be reassuring to know these examples actually work 🥴
e.g. for React, Vue and Svelte.
Describe the solution you'd like Expanding existing tests
Additional context I did set out to include tests, but got put off by the amount of setup needed to run tests for some libraries in Jest with TypeScript. Would love to have this resolved 🙏
I understand why you might want to stick to Jest, but I'd like to put forward a suggestion of using Vitest.
It has a Jest-like API, TypeScript support out-of-the-box, and you can use Vite plugins with it, so popular libraries are covered. From my experience I think it would be easier to set up.
At a minimum you can probably just add plugins for React, Vue, and Svelte to Vitest config and then it should be able to transform .jsx
, .tsx
, .vue
, and .svelte
files.
Cheers @brattonross, I'll take a look when I find a moment 🙏