Issue wih testing (Solid-jest)
Hello,
I'm currently working on a Solid Start library.
I'm currently using tsdx to package my app and jest to test my application.
Currently, I have an error when I execute tests !
GitHub
GitHub - jaredpalmer/tsdx: Zero-config CLI for TypeScript package d...
Zero-config CLI for TypeScript package development - GitHub - jaredpalmer/tsdx: Zero-config CLI for TypeScript package development
8 Replies
Errors log :
Code repository : https://github.com/qlaffont/solidstart-protected-auth
GitHub
GitHub - qlaffont/solidstart-protected-auth
Contribute to qlaffont/solidstart-protected-auth development by creating an account on GitHub.
Hi, I would recommend tsup as a library scaffolding tool against tsdx for two reasons:
- tsdx is already an abandoned tool
- tsdx doesn't understand Solid
https://github.com/solidjs-community/tsup-preset-solid
GitHub
GitHub - solidjs-community/tsup-preset-solid: Preset for building y...
Preset for building your SolidJS packages with tsup. - GitHub - solidjs-community/tsup-preset-solid: Preset for building your SolidJS packages with tsup.
for testing, I would recommend using Vitest but I'm not enforcing you to do so
thanks i will try to use tsup ^^
Okay migration to tsup is working but you are speaking about vitest but i see on official documentation is only supported to uwu or jest
@lxsmnsyc 🤖
that's if we are talking about solid-jest. Otherwise, you can normally use the vite plugin, although it might be a bit of work for you hence why I'm not enforcing it 🙂 You can also reach out to #testing
Understand ! For your information about vitest, i have try it without success :
It seems that the file system routing does not work in this setup. You will have to do this in the setup yourself, as jest is not directly supported by solid-start.