test: add baseline test for _tools/licenses/infer#12323
Draft
Planeshifter wants to merge 1 commit into
Draft
Conversation
Adds a `test/test.js` smoke test verifying that the package's main export is a function, and registers the corresponding `test` directory under `directories` in `package.json`. The 10 sibling packages in `@stdlib/_tools/licenses/*` already ship the same baseline pattern (91% conformance); `infer` was the sole outlier.
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.
Description
This pull request adds a baseline smoke test to
@stdlib/_tools/licenses/infer, the sole package in the@stdlib/_tools/licenses/*namespace that previously lacked atest/directory.The fix was produced by a cross-package drift audit over the 11 non-autogenerated members of the namespace. Two drift items were applied to
infer:test/test.jsexercisingtypeof infer === 'function', mirroring the boilerplate used by 10 of 11 (91%) siblings."test": "./test"entry underdirectoriesinpackage.json, mirroring 10 of 11 (91%) siblings.No other corrections survived filtering: the remaining semantic features either had no clear majority across the namespace or were satisfied by every package.
Namespace summary
test/test.jspresence,directories.testpresence,lib/index.jspresence,lib/main.jspresence,examples/index.jspresence,errorConstruction = format(9/11; outliersheader-regexpandinferdo not construct errors at all, so this was treated as a false positive and dropped).returnKind(6 value / 5 void),osinpackage.json(6/11),__stdlib__inpackage.json(6/11),directories.doc(8/11), READMENotessection (8/11), READMECLIsection (7/11), per-package signatures and validation prologues (each shape unique to the package).Per outlier package
_tools/licenses/inferAdded
test/test.jswith a baseline smoke test verifying the main export is a function (91% of@stdlib/_tools/licenses/*siblings carry this test). Added"test": "./test"todirectoriesinpackage.jsonfor the same reason — 91% conformance across siblings.Related Issues
This pull request has no related issues.
Questions
No.
Other
Validation
Three-agent validation was run over the candidate corrections:
@privateJSDoc tag oninfer's main function is a documentation tic shared across siblings (licenses,insert-header-file-list, etc.) and does not indicate the package is untestable; the module is exported and documented inREADME.mdas a usage-facing API.infer/package.jsonshows several signs of being incomplete relative to siblings (missingdirectories.test), consistent with unintentional drift.inferis structurally identical to its tested siblings (lib/index.jsre-exportinglib/main.js, aREADME.mddocumenting the API, abin/cli), and the boilerplate smoke test is universally applicable sincemodule.exportsis a function.Deliberately excluded from this PR:
errorConstruction"drift" inheader-regexpandinfer— both packages either delegate validation to a callee or are internal helpers with no thrown errors. There are no error messages to normalize.returnKind,os,__stdlib__,directories.doc, READMENotes/CLI).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of an automated cross-package drift detection routine over
@stdlib/_tools/licenses/*. The audit identified structural drift via majority vote across 11 sibling packages; the proposed correction was validated by three independent reviewer agents (semantic, cross-reference, structural) before being applied. A human maintainer should promote out of draft after review.@stdlib-js/reviewers
Generated by Claude Code