mock() — drizzle-orm Function Reference
Architecture documentation for the mock() function in index.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 2205d758_a8ff_d21e_e167_1df4e83622fb["mock()"] c48f608f_6ead_8a97_afb7_72a2931d53d5["index.ts"] 2205d758_a8ff_d21e_e167_1df4e83622fb -->|defined in| c48f608f_6ead_8a97_afb7_72a2931d53d5 b91dc682_fc28_2e61_4197_8c9918cec2d7["construct()"] 2205d758_a8ff_d21e_e167_1df4e83622fb -->|calls| b91dc682_fc28_2e61_4197_8c9918cec2d7 style 2205d758_a8ff_d21e_e167_1df4e83622fb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/libsql/node/index.ts lines 51–57
export function mock<TSchema extends Record<string, unknown> = Record<string, never>>(
config?: DrizzleConfig<TSchema>,
): LibSQLDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
} {
return construct({} as any, config) as any;
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does mock() do?
mock() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/libsql/node/index.ts.
Where is mock() defined?
mock() is defined in drizzle-orm/src/libsql/node/index.ts at line 51.
What does mock() call?
mock() calls 1 function(s): construct.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free