fix: TypeScript build errors in frontend pipeline
- Remove unused ReactNode import in useAuth.test.tsx - Use vitest/config for defineConfig to recognize test property - Add vitest/globals to tsconfig types for test runner globals
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { render, screen } from '@testing-library/react';
|
import { render, screen } from '@testing-library/react';
|
||||||
import { AuthProvider } from '../useAuth';
|
import { AuthProvider } from '../useAuth';
|
||||||
import { useAuth } from '../useAuth';
|
import { useAuth } from '../useAuth';
|
||||||
import { ReactNode } from 'react';
|
|
||||||
|
|
||||||
// Test component that uses useAuth hook
|
// Test component that uses useAuth hook
|
||||||
const TestComponent = () => {
|
const TestComponent = () => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"types": ["vite/client"],
|
"types": ["vite/client", "vitest/globals"],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vitest/config'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user