Skip to content

Commit

Permalink
test: boost coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Oct 28, 2023
1 parent b566b7d commit 6560865
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/config.test.ts
Original file line number Diff line number Diff line change
@@ -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()
})
7 changes: 7 additions & 0 deletions src/utils/loadEnv.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { expect, test } from 'vitest'

import { loadEnv } from './loadEnv.js'

test('loadEnv', () => {
expect(loadEnv()).toMatchInlineSnapshot('{}')
})

0 comments on commit 6560865

Please sign in to comment.