Home / File/ libsql-migrate.test.ts — drizzle-orm Source File

libsql-migrate.test.ts — drizzle-orm Source File

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

File typescript 3 imports

Entity Profile

Dependency Diagram

graph LR
  d5b45546_3c9e_35e5_1041_12d30c6bc086["libsql-migrate.test.ts"]
  33707adf_3867_206c_1f47_142479def47f["client"]
  d5b45546_3c9e_35e5_1041_12d30c6bc086 --> 33707adf_3867_206c_1f47_142479def47f
  bcc14b8d_6c38_88a6_4c1a_81596250482b["connections"]
  d5b45546_3c9e_35e5_1041_12d30c6bc086 --> bcc14b8d_6c38_88a6_4c1a_81596250482b
  8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"]
  d5b45546_3c9e_35e5_1041_12d30c6bc086 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686
  style d5b45546_3c9e_35e5_1041_12d30c6bc086 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { createClient } from '@libsql/client';
import { connectToLibSQL } from 'src/cli/connections';
import { expect, test } from 'vitest';

test('validate migrate function', async () => {
	const credentials = {
		url: ':memory:',
	};
	const { migrate, query } = await connectToLibSQL(credentials);

	await migrate({ migrationsFolder: 'tests/migrate/migrations' });

	const res = await query(`PRAGMA table_info("users");`);

	expect(res).toStrictEqual([{
		cid: 0,
		name: 'id',
		type: 'INTEGER',
		notnull: 0,
		dflt_value: null,
		pk: 0,
	}, {
		cid: 1,
		name: 'name',
		type: 'INTEGER',
		notnull: 1,
		dflt_value: null,
		pk: 0,
	}]);
});

// test('validate migrate function', async () => {
// 	const credentials = {
// 		url: '',
// 		authToken: '',
// 	};
// 	const { migrate, query } = await connectToLibSQL(credentials);

// 	await migrate({ migrationsFolder: 'tests/migrate/migrations' });

// 	const res = await query(`PRAGMA table_info("users");`);

// 	expect(res).toStrictEqual([{
// 		cid: 0,
// 		name: 'id',
// 		type: 'INTEGER',
// 		notnull: 0,
// 		dflt_value: null,
// 		pk: 0,
// 	}, {
// 		cid: 1,
// 		name: 'name',
// 		type: 'INTEGER',
// 		notnull: 1,
// 		dflt_value: null,
// 		pk: 0,
// 	}]);
// });

Dependencies

  • client
  • connections
  • vitest

Frequently Asked Questions

What does libsql-migrate.test.ts do?
libsql-migrate.test.ts is a source file in the drizzle-orm codebase, written in typescript.
What does libsql-migrate.test.ts depend on?
libsql-migrate.test.ts imports 3 module(s): client, connections, vitest.
Where is libsql-migrate.test.ts in the architecture?
libsql-migrate.test.ts is located at drizzle-kit/tests/migrate/libsql-migrate.test.ts (directory: drizzle-kit/tests/migrate).

Analyze Your Own Codebase

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

Try Supermodel Free