From 7568e0e81dca738b7b0587fb58ec66a88e1b0473 Mon Sep 17 00:00:00 2001 From: suddenlyGiovanni <15946771+suddenlyGiovanni@users.noreply.github.com> Date: Wed, 18 Dec 2024 04:34:29 +0100 Subject: [PATCH] test(web): remove obsolete test for missing build path argument Removed a test case that validated process.argv[2] for the server build path, as it is no longer relevant. Simplified imports for better readability and streamlined code structure. --- apps/web/server/server.spec.ts | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/apps/web/server/server.spec.ts b/apps/web/server/server.spec.ts index 5f90fb06..77d4875c 100644 --- a/apps/web/server/server.spec.ts +++ b/apps/web/server/server.spec.ts @@ -1,15 +1,4 @@ -import { - type MockInstance, - afterAll, - afterEach, - beforeEach, - describe, - expect, - it, - vi, -} from 'vitest' - -import { run } from './server.ts' +import { type MockInstance, afterAll, afterEach, beforeEach, describe, it, vi } from 'vitest' describe('server setup', () => { let consoleErrorSpy: MockInstance<(...args: unknown[]) => void> @@ -33,22 +22,6 @@ describe('server setup', () => { }) describe('configuration tests', () => { - it('should throw an error if process.argv[2] is empty', async () => { - // Act & Assert - await expect(run()).rejects.toThrow('process.exit(1)') - expect(consoleErrorSpy).toHaveBeenCalledWith( - ` -(Config (Encoded side) <-> Config) -└─ Encoded side transformation failure - └─ Config (Encoded side) - └─ Encoded side transformation failure - └─ Struct (Encoded side) - └─ ["buildPathArg"] - └─ Usage: node server/server.ts `.trimStart(), - undefined, - ) - }) - it.todo('should validate default values for NODE_ENV, PORT, and HOST') it.todo('should test schema validation for different configurations')