expectSchemaShape() — drizzle-orm Function Reference
Architecture documentation for the expectSchemaShape() function in utils.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD f3b1a23b_bcee_46b1_e5f7_5df6441a824e["expectSchemaShape()"] 220ae495_e2e6_9482_daa5_19553ac47578["utils.ts"] f3b1a23b_bcee_46b1_e5f7_5df6441a824e -->|defined in| 220ae495_e2e6_9482_daa5_19553ac47578 7b86910c_ef48_c82e_a020_5ca5da2e3670["removeKeysFromObject()"] f3b1a23b_bcee_46b1_e5f7_5df6441a824e -->|calls| 7b86910c_ef48_c82e_a020_5ca5da2e3670 style f3b1a23b_bcee_46b1_e5f7_5df6441a824e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-typebox/tests/utils.ts lines 11–24
export function expectSchemaShape<T extends t.TObject>(t: TaskContext, expected: T) {
return {
from(actual: T) {
expect(Object.keys(actual.properties)).toStrictEqual(Object.keys(expected.properties));
const keys = ['$id', '$schema', 'title', 'description', 'default', 'examples', 'readOnly', 'writeOnly'];
for (const key of Object.keys(actual.properties)) {
expect(removeKeysFromObject(actual.properties[key]!, keys)).toStrictEqual(
removeKeysFromObject(expected.properties[key]!, keys),
);
}
},
};
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does expectSchemaShape() do?
expectSchemaShape() is a function in the drizzle-orm codebase, defined in drizzle-typebox/tests/utils.ts.
Where is expectSchemaShape() defined?
expectSchemaShape() is defined in drizzle-typebox/tests/utils.ts at line 11.
What does expectSchemaShape() call?
expectSchemaShape() calls 1 function(s): removeKeysFromObject.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free