Add missing parser test coverage - #7
Open
AadhilFarhan wants to merge 1 commit into
Open
Conversation
- PsCommParser and PortScanner.parseCwds had zero tests. - Classifier.framework only exercised 7 of 27 non-.unknown Framework cases. Added the remaining 21, using invocations where each marker appears as its own clean token (never embedded in a longer word), so these pass identically under both the current substring-matching implementation and the token/basename-boundary matching this same review is landing in a separate PR. - ProjectNamer's two documented positive paths — falling back to the folder name when a manifest file or a project file (.xcodeproj etc.) is present — were untested; only the package.json and rejection paths had coverage.
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.
What
Coverage gaps flagged by review, none of them tied to a specific behavior change (this PR adds tests only, no source changes):
PsCommParser.parseandPortScanner.parseCwdshad zero tests despite being real parsers with their own line formats.Classifier.frameworkonly exercised 7 of 27 non-.unknownFrameworkcases. Added the remaining 21.ProjectNamer's two documented positive fallback paths (folder name when a manifest file exists; folder name when a project file like.xcodeprojexists) were untested — only the package.json-success and rejection paths had coverage.A note on the Classifier tests specifically
This same review is landing a separate PR (
fix/classifier-false-positives) that changes single-word marker matching from raw substring to token/basename-boundary matching. I deliberately wrote every new framework-detection test case so the marker appears as its own clean token (e.g.node node_modules/.bin/nuxt dev, never something likenuxt-experiments/server.jsthat only matches under substring semantics) — so these tests pass identically regardless of which of the two PRs merges first, and don't need any rework afterward.Test plan
Classifier.frameworkassertions pass individually (isolated withswift test --filter ClassifierTests, not just trusted from the aggregate count).