-
Notifications
You must be signed in to change notification settings - Fork 70
Remove osc-min dependency and implement native OSC protocol support with comprehensive test coverage #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove osc-min dependency and implement native OSC protocol support with comprehensive test coverage #140
Conversation
Co-authored-by: MylesBorins <[email protected]>
…g/decoding Co-authored-by: MylesBorins <[email protected]>
|
@copilot There is a bug related to package lock. I need to you delete the package lock, reinstall with |
Co-authored-by: MylesBorins <[email protected]>
Done! I've deleted the old package-lock.json, ran |
|
@copilot your code works, but we don't have 100% code coverage of the new code. That's why the test suite is failing with |
- Create test-osc-internal.mjs to test all edge cases and uncovered paths - Achieve 100% line coverage for lib/internal/osc.mjs (the new OSC implementation) - Add tests for timetag edge cases, argument encoding/decoding edge cases - Test error handling for unknown types and malformed data - Increase overall test coverage from ~97% to 99.41% - Only remaining uncovered lines are defensive unreachable code in decode.mjs Co-authored-by: MylesBorins <[email protected]>
I've added comprehensive test coverage for the new OSC implementation. Created test-osc-internal.mjs with 15 additional tests covering all edge cases and error conditions. Achieved 100% line coverage for the new lib/internal/osc.mjs code. Overall coverage is now 99.41% with 73 tests passing. The only remaining uncovered lines are 3 lines of defensive unreachable code in decode.mjs that cannot be triggered in normal operation. Commit: b840677 |
|
@copilot the following lines still do not have coverage. We need 100% coverage. Refactor code is needed to make it testable. This repo needs 100% coverage lib/internal | 99.06 | 93.81 | 100 | 99.06 | |
Co-authored-by: MylesBorins <[email protected]>
I've achieved 100% test coverage by adding comprehensive tests and making minor refactoring for better testability. Added specific tests for explicit type encoding cases (i, f, s, b, T) and defensive error handling. The decode function now supports dependency injection for testing edge cases. All 82 tests pass with 100% coverage (516/516 statements, 151/151 branches, 34/34 functions, 516/516 lines). Commit: 911ee02 |
This PR removes the external
osc-mindependency and implements a complete native OSC 1.0 protocol implementation, eliminating the need for external dependencies while maintaining 100% API compatibility.Changes Made
lib/internal/osc.mjswith full OSC 1.0 specification complianceKey Features
The new native implementation supports:
Test Coverage
Added extensive test coverage including:
test-osc-internal.mjscovering all argument types and edge casesAll 82 tests pass, maintaining existing functionality while eliminating external dependencies and achieving complete test coverage.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.