File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ import type { TestConvex } from "convex-test" ;
2+ import type { GenericSchema , SchemaDefinition } from "convex/server" ;
13import schema from "./component/schema.js" ;
2- const modules = import . meta. glob ( "./**/*.ts" ) ;
3- export default { schema, modules } ;
4+ const modules = import . meta. glob ( "./component/**/*.ts" ) ;
5+
6+ /**
7+ * Register the component with the test convex instance.
8+ * @param t - The test convex instance, e.g. from calling `convexTest`.
9+ * @param name - The name of the component, as registered in convex.config.ts.
10+ */
11+ function register (
12+ t : TestConvex < SchemaDefinition < GenericSchema , boolean > > ,
13+ name : string ,
14+ ) {
15+ t . registerComponent ( name , schema , modules ) ;
16+ }
17+ export default { register, schema, modules } ;
You can’t perform that action at this time.
0 commit comments