Skip to content

Commit 46514da

Browse files
committed
fix test import
1 parent 58cfde7 commit 46514da

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/storage/drizzle.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ describe("DrizzleStore", () => {
4747
typeof drizzle<{ apikey: typeof apikey }>
4848
>;
4949

50+
await pool.query("DROP TABLE IF EXISTS apikey CASCADE");
51+
await pool.query("DROP INDEX IF EXISTS apikey_key_hash_idx");
52+
await pool.query("DROP INDEX IF EXISTS apikey_key_hash_unique");
53+
5054
await pool.query(`
5155
CREATE TABLE IF NOT EXISTS apikey (
5256
id TEXT PRIMARY KEY NOT NULL,

src/storage/kysely.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";
44
import { createKeys } from "../manager";
55
import type { ApiKeyRecord } from "../types/api-key-types";
66
import { ApiKeyErrorCode } from "../types/error-types";
7-
import { type ApiKeysDatabase, KyselyStore } from "./kysely";
7+
import { type KyselyDB, KyselyStore } from "./kysely";
88

99
const REGEX_UPDATED_NAME = /Updated \d/;
1010
const MANY_SCOPES_COUNT = 25;
@@ -22,7 +22,7 @@ const OWNERS_COUNT = 10;
2222

2323
describe("KyselyStore", () => {
2424
let pool: Pool;
25-
let db: Kysely<ApiKeysDatabase>;
25+
let db: Kysely<KyselyDB>;
2626
let store: KyselyStore;
2727
let keys: ReturnType<typeof createKeys>;
2828

@@ -42,7 +42,7 @@ describe("KyselyStore", () => {
4242
throw error;
4343
}
4444

45-
db = new Kysely<ApiKeysDatabase>({
45+
db = new Kysely<KyselyDB>({
4646
dialect: new PostgresDialect({ pool }),
4747
});
4848

0 commit comments

Comments
 (0)