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:
2026-04-11 07:40:00 +02:00
parent d8aac21e2d
commit 4469fc42af
5 changed files with 122 additions and 108 deletions
+2 -2
View File
@@ -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 });
}