many fixes resultnig from latest refactoring
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 5m46s

This commit is contained in:
2025-12-08 23:07:50 -08:00
parent e156c385a5
commit c1a032d5e6
23 changed files with 66 additions and 81 deletions

View File

@@ -54,7 +54,7 @@ type PassportCallback = (error: Error | null, user: Express.User | false, info?:
// Mock Passport middleware
vi.mock('./passport.routes', () => ({
default: {
authenticate: (strategy: string, options: Record<string, unknown>, callback: PassportCallback) => (req: Request, res: any, next: any) => {
authenticate: (strategy: string, options: Record<string, unknown>, callback: PassportCallback) => (req: Request, res: any) => {
// Logic to simulate passport authentication outcome based on test input
if (req.body.password === 'wrong_password') {
// Simulate incorrect credentials
@@ -84,7 +84,7 @@ app.use(cookieParser()); // Add cookie-parser middleware to populate req.cookies
app.use('/api/auth', authRouter);
// Add error handler to catch and log 500s during tests
app.use((err: any, req: Request, res: any, next: any) => {
app.use((err: any, req: Request, res: any) => {
console.error('[TEST APP ERROR]', err);
res.status(500).json({ message: err.message });
});