Add comprehensive test suite using Node.js built-in test runner#4
Merged
electerious merged 4 commits intomainfrom Sep 6, 2025
Merged
Conversation
Co-authored-by: electerious <499088+electerious@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Node.js tests with strict assertions and update test script in package.json
Add comprehensive test suite using Node.js built-in test runner
Sep 5, 2025
Owner
|
@copilot Remove tests for the CLI |
Owner
|
@copilot Don't use port 0 in the tests, find a free port with 'get-port' instead |
Co-authored-by: electerious <499088+electerious@users.noreply.github.com>
Contributor
Author
CLI tests have been removed as requested. The test suite now only includes server and socket functionality tests (11 tests total, all passing). |
Co-authored-by: electerious <499088+electerious@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements a complete test suite for the lightroom-controller project using Node.js built-in test runner (
node --test) andnode:assert/strictas requested.Changes Made
Test Infrastructure
tests/directory containing comprehensive test coveragenode:assert/strictfor assertionsnpm testscriptTest Coverage
tests/server.test.js- HTTP Server functionality:/parameter/messageroutes)get-portpackage to find free ports instead of port 0tests/socket.test.js- WebSocket functionality:Test Results
The test suite validates the essential functionality of the Lightroom controller while maintaining minimal scope and following the project's established patterns. Tests use proper mocking to avoid external dependencies and ensure reliable, fast execution.
Usage
Recent Updates
get-portpackage for finding free ports✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.