diff --git a/src/config.test.ts b/src/config.test.ts new file mode 100644 index 0000000..0184a50 --- /dev/null +++ b/src/config.test.ts @@ -0,0 +1,20 @@ +import { Kysely, MysqlDialect } from 'kysely' +import { createPool } from 'mysql2' +import { expect, test } from 'vitest' + +import { defineConfig } from './config.js' + +test('defineConfig', () => { + expect( + defineConfig({ + db: new Kysely({ + dialect: new MysqlDialect({ pool: createPool('mysql://') }), + }), + migrationFolder: 'src/db/migrations', + codegen: { + dialect: 'mysql', + out: 'src/db/types.ts', + }, + }), + ).toBeDefined() +}) diff --git a/src/utils/loadEnv.test.ts b/src/utils/loadEnv.test.ts new file mode 100644 index 0000000..216e1b5 --- /dev/null +++ b/src/utils/loadEnv.test.ts @@ -0,0 +1,7 @@ +import { expect, test } from 'vitest' + +import { loadEnv } from './loadEnv.js' + +test('loadEnv', () => { + expect(loadEnv()).toMatchInlineSnapshot('{}') +})