components/password/test
Variables
default
default: object;
Type Declaration
modules
modules: Record<string, () => Promise<unknown>>;
registerPassword
registerPassword: (t, name) => void;
Register the password component with a convex-test instance.
The component throttles verifyPassword through a nested rate-limiter, so we
register that under <name>/rateLimiter too — mirroring how it's mounted when
the app app.uses the convex.config of the component.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
t | TestConvex<SchemaDefinition<GenericSchema, boolean>> | undefined | The test convex instance, e.g. from calling convexTest. |
name | string | "authPassword" | The name of the component, as registered in convex.config.ts. |
Returns
void
schema
schema: SchemaDefinition<{
passwords: TableDefinition<VObject<{
passwordHashPHC: string;
userId: string;
}, {
passwordHashPHC: VString<string, "required">;
userId: VString<string, "required">;
}, "required", "userId" | "passwordHashPHC">, {
by_userId: ["userId", "_creationTime"];
}, {
}, {
}>;
}, true>;
Functions
registerPassword()
function registerPassword(t, name?): void;
Register the password component with a convex-test instance.
The component throttles verifyPassword through a nested rate-limiter, so we
register that under <name>/rateLimiter too — mirroring how it's mounted when
the app app.uses the convex.config of the component.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
t | TestConvex<SchemaDefinition<GenericSchema, boolean>> | undefined | The test convex instance, e.g. from calling convexTest. |
name | string | "authPassword" | The name of the component, as registered in convex.config.ts. |
Returns
void