Add Node 24 integration tests for Discord API and TLS validation #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The security workflow sets
NODE_VERSION: '24'but only runspnpm audit. The test workflow runs the full suite on Node 24, but all tests use mocks. This adds real integration tests validating Node 24 + OpenSSL 3.5 TLS connectivity, Discord.js compatibility, and npm v11 lifecycle scripts.Changes
Integration test files:
src/__tests__/integration/node24-discord.integration.test.ts- Validates Discord API TLS connectivity, cipher suites (TLS 1.3), HTTPS agent configuration, and runtime versionssrc/__tests__/integration/lifecycle-scripts.integration.test.ts- Validates TypeScript build and npm v11 lifecycle scriptsConfiguration:
vitest.integration.config.ts- Separate config with no mocks, 30s timeouts, serial executionvitest.config.ts- Exclude*.integration.test.tsfrom unit test runspackage.json- Addtest:integration,test:integration:watch,test:allscriptsCI/CD workflows:
.github/workflows/test.yml- Addintegration-testsjob with Node 20/24 matrix.github/workflows/security.yml- Addruntime-validationjob for Node 24 validationExample
Integration tests use real implementations instead of mocks:
Matrix testing validates both Node 20 (minimum) and 24 (current) without additional dependencies.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
discord.com/usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/unthread-discord-bot/unthread-discord-bot/node_modules/.pnpm/vitest@4.0.15_@types+node@24.7.2_@vitest+ui@4.0.15/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/unthread-discord-bot/unthread-discord-bot/node_modules/.pnpm/vitest@4.0.15_@types+node@24.7.2_@vitest+ui@4.0.15/node_modules/vitest/dist/workers/forks.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Add Node 24 Integration Tests for Discord API and TLS Validation
Objective
Implement focused integration tests to validate Node 24 compatibility, specifically testing Discord API connectivity, TLS behavior with OpenSSL 3.5, and npm v11 lifecycle scripts - without requiring complex testcontainers infrastructure.
Context
Currently, the security.yml workflow sets NODE_VERSION to '24' but only runs
pnpm audit. The test.yml workflow does run the full test suite on Node 24, but all tests use mocks. We need actual integration tests that validate:Implementation Requirements
1. Create Integration Test Files
File:
src/__tests__/integration/node24-discord.integration.test.tsFile:
src/__tests__/integration/lifecycle-scripts.integration.test.ts2. Create Integration Test Configuration
File:
vitest.integration.config.ts