From 007501cbd2f1e2625cc6f331542e2959dc707ccc Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 8 Jun 2024 20:21:14 +0200 Subject: [PATCH] fix: unit tests not working --- packages/auth/test/callbacks.spec.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/auth/test/callbacks.spec.ts b/packages/auth/test/callbacks.spec.ts index 6e46f220b..ed66f9af4 100644 --- a/packages/auth/test/callbacks.spec.ts +++ b/packages/auth/test/callbacks.spec.ts @@ -3,7 +3,7 @@ import type { ResponseCookie } from "next/dist/compiled/@edge-runtime/cookies"; import type { ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies"; import { cookies } from "next/headers"; import type { Adapter, AdapterUser } from "@auth/core/adapters"; -import type { Account, User } from "next-auth"; +import type { Account } from "next-auth"; import type { JWT } from "next-auth/jwt"; import { describe, expect, it, test, vi } from "vitest"; @@ -142,21 +142,11 @@ describe("createSignInCallback", () => { expect(result).toBe(true); }); - it("should return true if no user", async () => { - const isCredentialsRequest = true; - const signInCallback = createSignInCallback(createAdapter(), isCredentialsRequest); - const result = await signInCallback({ - user: undefined as unknown as User, - account: {} as Account, - }); - expect(result).toBe(true); - }); - it("should return false if no adapter.createSession", async () => { const isCredentialsRequest = true; const signInCallback = createSignInCallback( // https://github.com/nextauthjs/next-auth/issues/6106 - undefined as unknown as Adapter, + { createSession: undefined } as unknown as Adapter, isCredentialsRequest, ); const result = await signInCallback({