fix type errors
This commit is contained in:
parent
e74f80db85
commit
2d7936d10b
2 changed files with 14 additions and 7 deletions
|
|
@ -4,6 +4,7 @@ import {
|
|||
generateOAuthErrorDescription,
|
||||
parseOAuthCallbackParams,
|
||||
} from "@/utils/oauthUtils.ts";
|
||||
import { AuthDebuggerState } from "@/lib/auth-types";
|
||||
|
||||
interface OAuthCallbackProps {
|
||||
onConnect: ({
|
||||
|
|
@ -13,7 +14,7 @@ interface OAuthCallbackProps {
|
|||
}: {
|
||||
authorizationCode?: string;
|
||||
errorMsg?: string;
|
||||
restoredState?: any;
|
||||
restoredState?: AuthDebuggerState;
|
||||
}) => void;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -441,8 +441,16 @@ describe("AuthDebugger", () => {
|
|||
const updateAuthState = jest.fn();
|
||||
|
||||
// Mock window.location.href setter
|
||||
delete (window as any).location;
|
||||
window.location = { href: "" } as any;
|
||||
const originalLocation = window.location;
|
||||
const locationMock = {
|
||||
...originalLocation,
|
||||
href: "",
|
||||
origin: "http://localhost:3000"
|
||||
};
|
||||
Object.defineProperty(window, 'location', {
|
||||
writable: true,
|
||||
value: locationMock
|
||||
});
|
||||
|
||||
// Setup mocks for OAuth flow
|
||||
mockStartAuthorization.mockResolvedValue({
|
||||
|
|
|
|||
Loading…
Reference in a new issue