Home / File/ cli-push.test.ts — drizzle-orm Source File

cli-push.test.ts — drizzle-orm Source File

Architecture documentation for cli-push.test.ts, a typescript file in the drizzle-orm codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  e8474ca5_c1a7_7fd8_44e6_535644e190a3["cli-push.test.ts"]
  5bf76609_579e_d312_b33b_ab5b8b683111["schema.ts"]
  e8474ca5_c1a7_7fd8_44e6_535644e190a3 --> 5bf76609_579e_d312_b33b_ab5b8b683111
  1c7f9ac7_5c40_4d3d_8edf_fcb550a29ebe["brocli"]
  e8474ca5_c1a7_7fd8_44e6_535644e190a3 --> 1c7f9ac7_5c40_4d3d_8edf_fcb550a29ebe
  8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"]
  e8474ca5_c1a7_7fd8_44e6_535644e190a3 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686
  style e8474ca5_c1a7_7fd8_44e6_535644e190a3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { test as brotest } from '@drizzle-team/brocli';
import { assert, expect, test } from 'vitest';
import { push } from '../src/cli/schema';

// good:
// #1 drizzle-kit push
// #2 drizzle-kit push --config=turso.config.ts
// #3 drizzle-kit push --config=d1http.config.ts
// #4 drizzle-kit push --config=postgres.config.ts ## spread connection params
// #5 drizzle-kit push --config=drizzle2.config.ts ## custom schema and table for migrations journal

// errors:
// #1 drizzle-kit push --config=expo.config.ts
// TODO: missing required params in config?

test('push #1', async (t) => {
	const res = await brotest(push, '');
	if (res.type !== 'handler') assert.fail(res.type, 'handler');
	expect(res.options).toStrictEqual({
		dialect: 'postgresql',
		credentials: {
			url: 'postgresql://postgres:postgres@127.0.0.1:5432/db',
		},
		force: false,
		schemaPath: './schema.ts',
		schemasFilter: ['public'],
		tablesFilter: [],
		entities: undefined,
		strict: false,
		verbose: false,
		casing: undefined,
	});
});

test('push #2', async (t) => {
	const res = await brotest(push, '--config=turso.config.ts');
	if (res.type !== 'handler') assert.fail(res.type, 'handler');
	expect(res.options).toStrictEqual({
		dialect: 'turso',
		credentials: {
			authToken: 'token',
			url: 'turso.dev',
		},
		force: false,
		schemaPath: './schema.ts',
		schemasFilter: ['public'],
		tablesFilter: [],
		strict: false,
		verbose: false,
		casing: undefined,
	});
});

test('push #3', async (t) => {
	const res = await brotest(push, '--config=d1http.config.ts');
	if (res.type !== 'handler') assert.fail(res.type, 'handler');
	expect(res.options).toStrictEqual({
		dialect: 'sqlite',
		credentials: {
			driver: 'd1-http',
// ... (67 more lines)

Domain

Dependencies

Frequently Asked Questions

What does cli-push.test.ts do?
cli-push.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does cli-push.test.ts depend on?
cli-push.test.ts imports 3 module(s): brocli, schema.ts, vitest.
Where is cli-push.test.ts in the architecture?
cli-push.test.ts is located at drizzle-kit/tests/cli-push.test.ts (domain: DrizzleORM, directory: drizzle-kit/tests).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free