defenseunicorns / leapfrogai

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.
https://leapfrog.ai
Apache License 2.0
244 stars 25 forks source link

chore(ui): FInd way to test sad path for form actions using superform #636

Open andrewrisse opened 2 weeks ago

andrewrisse commented 2 weeks ago

When unit testing components that post to a form action that uses sveltekit-superforms, we have not yet figured out how to properly mock the data and form returned by the form action.

Figuring out how to mock this would allow us to test more edge cases (for example, mocking a successful form action submission that returns file uploads with error status).

If able to properly mock, review tests that submit these form actions and add additional tests for anything missing.