test(spdx): extend SPDX-header scan to tests/ to match documented intent#263
Merged
Merged
Conversation
… intent The header comment on this test claims "every JS file in app/, server.js, and tests/ carries the Apache-2.0 SPDX header" but `SCAN_ROOTS` only included `'app'` — tests/ was named in the comment but never actually walked. The regression net had a gap: a future test file copy-pasted from a header-less template would slip past CI. All current test files already have the header, so adding `'tests'` to `SCAN_ROOTS` is a no-op behavior-wise — the new assertions all pass (test count went from 688 to 742, +54 new per-file checks for the existing test files). Now the floor matches what the comment promised. Updated the surrounding comment to describe the new scope (instead of the stale "tests/integration/ skipped" note that was confusing given the actual SCAN_ROOTS didn't include any tests dir at all). Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
The header comment on
tests/unit/spdx-headers.test.jsclaims "every JS file in app/, server.js, and tests/ carries the Apache-2.0 SPDX header" — butSCAN_ROOTSonly included'app'.tests/was named in the comment but never actually walked. The regression net had a real gap: a future test file copy-pasted from a header-less template would slip past CI.What changed
'tests'toSCAN_ROOTS.Impact
tests/**/*.jsfile will fail CI alongside the same check forapp/.Test plan
npm run lint && npm test— 742 passing locally (was 688)Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/