tests() — drizzle-orm Function Reference
Architecture documentation for the tests() function in singlestore-common.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 850f4c00_692c_1d88_ade9_69e3d5af9d75["tests()"] f934c582_f266_1cbe_5ff9_08bc5f148179["singlestore-common.ts"] 850f4c00_692c_1d88_ade9_69e3d5af9d75 -->|defined in| f934c582_f266_1cbe_5ff9_08bc5f148179 style 850f4c00_692c_1d88_ade9_69e3d5af9d75 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
integration-tests/tests/singlestore/singlestore-common.ts lines 285–4041
export function tests(driver?: string) {
describe('common', () => {
afterAll(async () => {
await singlestoreContainer?.stop().catch(console.error);
});
beforeEach(async (ctx) => {
const { db } = ctx.singlestore;
await db.execute(sql`drop table if exists userstest`);
await db.execute(sql`drop table if exists users2`);
await db.execute(sql`drop table if exists cities`);
await db.execute(sql`drop table if exists ${allTypesTable}`);
await db.execute(sql`drop schema if exists \`mySchema\``);
await db.execute(sql`create schema if not exists \`mySchema\``);
await db.execute(
sql`
create table userstest (
id serial primary key,
name text not null,
verified boolean not null default false,
jsonb json,
created_at timestamp not null default now()
)
`,
);
await db.execute(
sql`
create table users2 (
id serial primary key,
name text not null,
city_id int
)
`,
);
await db.execute(
sql`
create table cities (
id serial primary key,
name text not null
)
`,
);
// mySchema
await db.execute(
sql`
create table \`mySchema\`.\`userstest\` (
\`id\` serial primary key,
\`name\` text not null,
\`verified\` boolean not null default false,
\`jsonb\` json,
\`created_at\` timestamp not null default now()
)
`,
);
await db.execute(
sql`
create table \`mySchema\`.\`cities\` (
\`id\` serial primary key,
\`name\` text not null
)
`,
);
await db.execute(
sql`
create table \`mySchema\`.\`users2\` (
\`id\` serial primary key,
\`name\` text not null,
\`city_id\` int
)
`,
);
});
async function setupReturningFunctionsTest(db: SingleStoreDatabase<any, any>) {
Domain
Subdomains
Source
Frequently Asked Questions
What does tests() do?
tests() is a function in the drizzle-orm codebase, defined in integration-tests/tests/singlestore/singlestore-common.ts.
Where is tests() defined?
tests() is defined in integration-tests/tests/singlestore/singlestore-common.ts at line 285.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free