Stack logo
Sync up on the latest from Convex.

Testing

Testing authenticated functions from the dashboard
You can test functions that rely on a sign-in by decoding your JWT and using the fields with "Act as a user" on the dashboard.
Ian Macartney's avatar
Ian Macartney
5 months ago
Testing patterns for peace of mind
Learn about best practices for testing your full-stack apps - running on Convex or elsewhere!
Ian Macartney's avatar
Ian Macartney
9 months ago
Running tests using a local open-source backend
Convex recently released an open source version of the backend. We can use this to unit test Convex functions by running them with a local backend. These tests will work by running a backend locally, pushing your code, and using the `ConvexClient` to execute queries and mutations from your favorite testing framework and asserting on the results.
Sarah Shader's avatar
Sarah Shader
10 months ago
Seeding Data for Preview Deployments
Now that we've launched Preview Deployments on Convex, you can test out backend changes easier than ever. But you may want to seed your project with data first, so let's go over how to do that.
Ian Macartney's avatar
Ian Macartney
a year ago
Testing Your App: How to Generate Fake Data
Learn how to generate fake data for your dev deployments using the Faker library
Nicolas Ettlin's avatar
Nicolas Ettlin
a year ago
Testing React Components with Convex
Oftentimes during testing we want to mock out our backend so we can unit test our UI components without talking to our actual server code. In this article, we’ll explore options for testing React components that call Convex React hooks using mocking and dependency injection. To do this, I’ve written a sample TypeScript React app using the Vitest testing framework. The patterns presented in this post are also applicable to other JavaScript apps and frameworks.
Ari's avatar
Ari
2 years ago