fix unit tests
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 40s

This commit is contained in:
2025-12-29 16:37:51 -08:00
parent 7f665f5117
commit 0a14193371
8 changed files with 1007 additions and 8 deletions

View File

@@ -1,7 +1,6 @@
// src/routes/system.routes.test.ts
import { describe, it, expect, vi, beforeEach } from 'vitest';
import supertest from 'supertest';
import systemRouter from './system.routes'; // This was a duplicate, fixed.
import { exec, type ExecException, type ExecOptions } from 'child_process';
import { geocodingService } from '../services/geocodingService.server';
import { createTestApp } from '../tests/utils/createTestApp';
@@ -65,6 +64,9 @@ vi.mock('../services/logger.server', () => ({
},
}));
// Import the router AFTER all mocks are defined to ensure systemService picks up the mocked util.promisify
import systemRouter from './system.routes';
describe('System Routes (/api/system)', () => {
const app = createTestApp({ router: systemRouter, basePath: '/api/system' });