components/username/test
Variables
default
default: object;
Type Declaration
modules
modules: Record<string, () => Promise<unknown>>;
registerUsername
registerUsername: (t, name) => void;
Register the component with the test convex instance.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
t | TestConvex<SchemaDefinition<GenericSchema, boolean>> | undefined | The test convex instance, e.g. from calling convexTest. |
name | string | "authUsername" | The name of the component, as registered in convex.config.ts. |
Returns
void
schema
schema: SchemaDefinition<{
usernames: TableDefinition<VObject<{
userId: string;
username: string;
usernameNormalized: string;
}, {
userId: VString<string, "required">;
username: VString<string, "required">;
usernameNormalized: VString<string, "required">;
}, "required", "userId" | "username" | "usernameNormalized">, {
by_userId: ["userId", "_creationTime"];
by_usernameNormalized: ["usernameNormalized", "_creationTime"];
}, {
}, {
}>;
}, true>;
Functions
registerUsername()
function registerUsername(t, name?): void;
Register the component with the test convex instance.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
t | TestConvex<SchemaDefinition<GenericSchema, boolean>> | undefined | The test convex instance, e.g. from calling convexTest. |
name | string | "authUsername" | The name of the component, as registered in convex.config.ts. |
Returns
void