Skip to content

Commit

Permalink
test(web): remove obsolete test for missing build path argument
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
suddenlyGiovanni committed Dec 18, 2024
1 parent 43fa362 commit 7568e0e
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions apps/web/server/server.spec.ts
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -33,22 +22,6 @@ describe('server setup', () => {
})

describe('configuration tests', () => {
it('should throw an error if process.argv[2] <server-build-path> 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 <server-build-path>`.trimStart(),
undefined,
)
})

it.todo('should validate default values for NODE_ENV, PORT, and HOST')

it.todo('should test schema validation for different configurations')
Expand Down

0 comments on commit 7568e0e

Please sign in to comment.