fix(build): resolve Next.js build failures from invalid route exports
- Extract detectAuthAnomalies + THRESHOLDS from route.ts to detect.ts (Next.js rejects non-standard exports from route files) - Add explicit RenderResult return type to test-utils customRender - Skip ESLint during next build (runs separately via pnpm lint) - Revert test file exclusions from tsconfig (breaks eslint parser) - Update route.test.ts imports to match new file structure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { render, type RenderOptions } from "@testing-library/react";
|
||||
import { render, type RenderOptions, type RenderResult } from "@testing-library/react";
|
||||
import type { ReactElement } from "react";
|
||||
|
||||
function createTestQueryClient() {
|
||||
@@ -16,7 +16,7 @@ function TestProviders({ children }: { children: React.ReactNode }) {
|
||||
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
|
||||
}
|
||||
|
||||
function customRender(ui: ReactElement, options?: Omit<RenderOptions, "wrapper">) {
|
||||
function customRender(ui: ReactElement, options?: Omit<RenderOptions, "wrapper">): RenderResult {
|
||||
return render(ui, { wrapper: TestProviders, ...options });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user