Repository navigation
♻️ Extract the adapters' decisions into tested, vscode-free modules - #24
Merged
Merged
Conversation
The VS Code adapters had logic that no unit test could reach. It now lives in modules that plain Node tests cover, and the adapters only wire it to the editor: - testReporting.ts: a reporter's id lookup, dropped and excluded results, gdb log links, and failure and error locations, as plain messages for a RunSink. - debugLaunch.ts: which file a debug request debugs, and the launch configuration with the executable's path spliced in. - watchPolicy.ts: what settings changes and source file events do, watcher reconciliation, and the edit-reparse Debouncer. - diagnosticsStore.ts: each run's diagnostics by id, shown by file without duplicates. - testModel.ts: controllerLabel, the Testing view's name for a folder's tests. The launch configuration splice now replaces within string values rather than in serialized JSON. A quote in the executable's path made the JSON unparseable, and a backslash would have been read as an escape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Development.md's module table gains testReporting, debugLaunch, watchPolicy, and diagnosticsStore, and says where an adapter's decisions belong. Staying current, Reporting, and Debugging name the functions that now make each decision, and the coverage notes say why the adapters still show 0%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fourth PR in the lint-and-coverage series, stacked on #23. It moves the decisions inside the VS Code adapters into pure modules that unit tests reach, and leaves the adapters as wiring. Fake-Ceedling integration tests for the wiring itself follow in the next PR.
New modules
testReporting.tstestController.makeReporterRunSink, and the controller buildsTestMessages from them.debugLaunch.tstestController.handleDebug,resolveLaunchConfigwatchPolicy.tstestControllerDebouncer.diagnosticsStore.tsProblemMatcherProblemMatchernow only publishes the store to itsDiagnosticCollection.controllerLabelintestModel.tsmain.labelForFix
The launch configuration splice now replaces within string values rather than in serialized JSON. A test written first showed the problem:
"in the executable's path madeJSON.parsethrow, so debugging failed with only a logged error.\would have been read as a JSON escape.Real paths rarely contain either, since the subpath is built from Ceedling's file list split on separators, but the fix costs nothing.
Coverage
testController.tsstatements (still untested by units)problemMatcher.tsstatements (still untested by units)The five new modules are at 100% statements and branches. That covers 36 new unit tests, for 347 in all, plus 4 integration tests. Lint reports 0 findings.
Docs
docs/Development.md:No CHANGELOG entry: the splice fix has no realistic user-facing trigger.
🤖 Generated with Claude Code