Skip to content

Commit 6560865

Browse files
committed
test: boost coverage
1 parent b566b7d commit 6560865

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/config.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Kysely, MysqlDialect } from 'kysely'
2+
import { createPool } from 'mysql2'
3+
import { expect, test } from 'vitest'
4+
5+
import { defineConfig } from './config.js'
6+
7+
test('defineConfig', () => {
8+
expect(
9+
defineConfig({
10+
db: new Kysely({
11+
dialect: new MysqlDialect({ pool: createPool('mysql://') }),
12+
}),
13+
migrationFolder: 'src/db/migrations',
14+
codegen: {
15+
dialect: 'mysql',
16+
out: 'src/db/types.ts',
17+
},
18+
}),
19+
).toBeDefined()
20+
})

src/utils/loadEnv.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { expect, test } from 'vitest'
2+
3+
import { loadEnv } from './loadEnv.js'
4+
5+
test('loadEnv', () => {
6+
expect(loadEnv()).toMatchInlineSnapshot('{}')
7+
})

0 commit comments

Comments
 (0)