/opt/canhelp/node_modules/better-auth/dist/plugins/test-utils
NameSizeModeActions
auth-helpers.mjs10250644editdlrm
auth-helpers.mjs.map22610644editdlrm
cookie-builder.mjs17950644editdlrm
cookie-builder.mjs.map33210644editdlrm
db-helpers.mjs16200644editdlrm
db-helpers.mjs.map32200644editdlrm
factories.mjs15100644editdlrm
factories.mjs.map27660644editdlrm
index.d.mts17520644editdlrm
index.mjs28520644editdlrm
index.mjs.map58690644editdlrm
otp-sink.mjs5290644editdlrm
otp-sink.mjs.map8440644editdlrm
types.d.mts14890644editdlrm
Edit: /opt/canhelp/node_modules/better-auth/dist/plugins/test-utils/index.d.mts (1752B)
import { LoginResult, TestCookie, TestHelpers, TestUtilsOptions } from "./types.mjs"; import * as _better_auth_core0 from "@better-auth/core"; //#region src/plugins/test-utils/index.d.ts declare module "@better-auth/core" { interface BetterAuthPluginRegistry { "test-utils": { creator: typeof testUtils; }; } } /** * Test utilities plugin for Better Auth. * * Provides helpers for integration and E2E testing including: * - User/Organization factories (creates objects without DB writes) * - Database helpers (save, delete) * - Auth helpers (login, getAuthHeaders, getCookies) * - OTP capture (when captureOTP: true) * * @example * ```ts * import { betterAuth } from "better-auth"; * import { testUtils } from "better-auth/plugins"; * * export const auth = betterAuth({ * plugins: [ * testUtils({ captureOTP: true }), * ], * }); * * // In tests, access helpers via context: * const ctx = await auth.$context; * const test = ctx.test; * * const user = test.createUser({ email: "test@example.com" }); * const savedUser = await test.saveUser(user); * const { headers, cookies } = await test.login({ userId: user.id }); * ``` */ declare const testUtils: (options?: TestUtilsOptions) => { id: "test-utils"; init(ctx: _better_auth_core0.AuthContext): { context: { test: TestHelpers; }; options: { databaseHooks: { verification: { create: { after(verification: { identifier: string; value: string; } | null): Promise; }; }; }; } | undefined; }; options: TestUtilsOptions; }; //#endregion export { testUtils }; //# sourceMappingURL=index.d.mts.map