chore: upgrade Node.js runtime to v24 across codebase #419

Merged
jason.woltje merged 438 commits from fix/auth-frontend-remediation into main 2026-02-17 01:04:47 +00:00
Showing only changes of commit ecfd02541f - Show all commits

View File

@@ -1,7 +1,10 @@
import { describe, it, expect, beforeAll, afterAll } from "vitest";
import { describe, it, expect, beforeAll, afterAll, vi } from "vitest";
import { Test, TestingModule } from "@nestjs/testing";
import { ConfigService } from "@nestjs/config";
import { JobEventsService } from "./job-events.service";
import { PrismaService } from "../prisma/prisma.service";
import { VaultService } from "../vault/vault.service";
import { CryptoService } from "../federation/crypto.service";
import { JOB_CREATED, JOB_STARTED, STEP_STARTED } from "./event-types";
/**
@@ -22,8 +25,30 @@ describeFn("JobEventsService Performance", () => {
let testWorkspaceId: string;
beforeAll(async () => {
// Mock ConfigService for VaultService/CryptoService
const mockConfigService = {
get: vi.fn((key: string) => {
const config: Record<string, string> = {
ENCRYPTION_KEY: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
OPENBAO_ADDR: "http://localhost:8200",
OPENBAO_ROLE_ID: "test-role-id",
OPENBAO_SECRET_ID: "test-secret-id",
};
return config[key] || null;
}),
};
const module: TestingModule = await Test.createTestingModule({
providers: [JobEventsService, PrismaService],
providers: [
JobEventsService,
PrismaService,
{
provide: ConfigService,
useValue: mockConfigService,
},
VaultService,
CryptoService,
],
}).compile();
service = module.get<JobEventsService>(JobEventsService);