Skip to main content

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​
ParameterTypeDefault valueDescription
tTestConvex<SchemaDefinition<GenericSchema, boolean>>undefinedThe test convex instance, e.g. from calling convexTest.
namestring"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​

ParameterTypeDefault valueDescription
tTestConvex<SchemaDefinition<GenericSchema, boolean>>undefinedThe test convex instance, e.g. from calling convexTest.
namestring"authUsername"The name of the component, as registered in convex.config.ts.

Returns​

void