chore: bump vitest version (#3810)

* chore: bump vitest version

* cleanup the server
This commit is contained in:
Alex Yang
2025-08-05 16:00:44 -07:00
committed by Bereket Engida
parent 45cedddbb0
commit 50c465d73a
10 changed files with 494 additions and 543 deletions

View File

@@ -14,10 +14,9 @@
"hono": "^4.7.2" "hono": "^4.7.2"
}, },
"devDependencies": { "devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.7.1", "@cloudflare/vitest-pool-workers": "^0.8.60",
"@cloudflare/workers-types": "^4.20250214.0", "@cloudflare/workers-types": "^4.20250805.0",
"drizzle-kit": "^0.30.4", "drizzle-kit": "^0.30.4",
"vitest": "^2.1.8",
"wrangler": "^3.109.2" "wrangler": "^3.109.2"
} }
} }

View File

@@ -19,7 +19,7 @@
"test": "turbo --filter \"./packages/*\" test", "test": "turbo --filter \"./packages/*\" test",
"typecheck": "turbo --filter \"./packages/*\" typecheck" "typecheck": "turbo --filter \"./packages/*\" typecheck"
}, },
"dependencies": { "devDependencies": {
"@biomejs/biome": "2.1.3", "@biomejs/biome": "2.1.3",
"@types/node": "^20.17.9", "@types/node": "^20.17.9",
"bumpp": "^9.8.1", "bumpp": "^9.8.1",
@@ -29,7 +29,8 @@
"taze": "^0.18.0", "taze": "^0.18.0",
"tinyglobby": "^0.2.10", "tinyglobby": "^0.2.10",
"turbo": "^2.3.3", "turbo": "^2.3.3",
"typescript": "catalog:" "typescript": "catalog:",
"vitest": "catalog:"
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {

View File

@@ -735,7 +735,6 @@
"tedious": "^18.6.1", "tedious": "^18.6.1",
"typescript": "catalog:", "typescript": "catalog:",
"unbuild": "catalog:", "unbuild": "catalog:",
"vitest": "^1.6.0",
"vue": "^3.5.13", "vue": "^3.5.13",
"zod": "^4.0.0" "zod": "^4.0.0"
}, },

View File

@@ -345,17 +345,25 @@ describe("oidc", async () => {
}); });
describe("oidc storage", async () => { describe("oidc storage", async () => {
let server: Listener;
afterEach(async () => {
if (server) {
await server.close();
}
});
test.each([ test.each([
{ {
storeClientSecret: undefined, storeClientSecret: undefined,
}, },
{ {
storeClientSecret: "hashed" as const, storeClientSecret: "hashed",
}, },
{ {
storeClientSecret: "encrypted" as const, storeClientSecret: "encrypted",
}, },
])("OIDC base test", async ({ storeClientSecret }) => { ] as const)("OIDC base test", async ({ storeClientSecret }) => {
const { const {
auth: authorizationServer, auth: authorizationServer,
signInWithTestUser, signInWithTestUser,
@@ -389,7 +397,7 @@ describe("oidc storage", async () => {
}, },
}); });
let server = await listen(toNodeHandler(authorizationServer.handler), { server = await listen(toNodeHandler(authorizationServer.handler), {
port: 3000, port: 3000,
}); });
@@ -496,15 +504,19 @@ describe("oidc storage", async () => {
}, },
}); });
expect(callbackURL).toContain("/dashboard"); expect(callbackURL).toContain("/dashboard");
afterEach(async () => {
await server.close();
});
}); });
}); });
describe("oidc-jwt", async () => { describe("oidc-jwt", async () => {
let server: Listener | null = null; let server: Listener | null = null;
afterEach(async () => {
if (server) {
await server.close();
server = null;
}
});
test.each([ test.each([
{ useJwt: true, description: "with jwt plugin", expected: "EdDSA" }, { useJwt: true, description: "with jwt plugin", expected: "EdDSA" },
{ useJwt: false, description: "without jwt plugin", expected: "HS256" }, { useJwt: false, description: "without jwt plugin", expected: "HS256" },
@@ -543,7 +555,6 @@ describe("oidc-jwt", async () => {
headers, headers,
}, },
}); });
if (server) console.log("server is not null");
server = await listen(toNodeHandler(authorizationServer.handler), { server = await listen(toNodeHandler(authorizationServer.handler), {
port: 3000, port: 3000,
}); });
@@ -681,13 +692,6 @@ describe("oidc-jwt", async () => {
// expect(checkSignature.payload).toBeDefined(); // expect(checkSignature.payload).toBeDefined();
expect(decoded.alg).toBe(expected); expect(decoded.alg).toBe(expected);
afterEach(async () => {
if (server) {
await server.close();
server = null;
}
});
}, },
); );
}); });

View File

@@ -36,7 +36,6 @@
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"typescript": "catalog:", "typescript": "catalog:",
"unbuild": "catalog:", "unbuild": "catalog:",
"vitest": "^1.6.0",
"zod": "^4.0.0" "zod": "^4.0.0"
}, },
"dependencies": { "dependencies": {

View File

@@ -58,8 +58,7 @@
"expo-linking": "~7.0.5", "expo-linking": "~7.0.5",
"expo-secure-store": "~14.0.1", "expo-secure-store": "~14.0.1",
"expo-web-browser": "~14.0.2", "expo-web-browser": "~14.0.2",
"unbuild": "^3.5.0", "unbuild": "^3.5.0"
"vitest": "^1.6.0"
}, },
"peerDependencies": { "peerDependencies": {
"better-auth": "workspace:*" "better-auth": "workspace:*"

View File

@@ -64,7 +64,6 @@
"@types/body-parser": "^1.19.6", "@types/body-parser": "^1.19.6",
"@types/express": "^5.0.3", "@types/express": "^5.0.3",
"better-call": "catalog:", "better-call": "catalog:",
"vitest": "^1.6.0",
"zod": "^4.0.0" "zod": "^4.0.0"
} }
} }

View File

@@ -53,7 +53,6 @@
"better-call": "catalog:", "better-call": "catalog:",
"better-sqlite3": "^11.6.0", "better-sqlite3": "^11.6.0",
"stripe": "^18.0.0", "stripe": "^18.0.0",
"vitest": "^1.6.0",
"zod": "^4.0.0" "zod": "^4.0.0"
} }
} }

981
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,3 +15,4 @@ catalog:
"@better-fetch/fetch": "^1.1.18" "@better-fetch/fetch": "^1.1.18"
"unbuild": "^3.5.0" "unbuild": "^3.5.0"
"typescript": "^5.9.2" "typescript": "^5.9.2"
"vitest": "^3.2.4"