fix(ci): use explicit test path — glob not expanded by sh on Linux#11
Merged
fix(ci): use explicit test path — glob not expanded by sh on Linux#11
Conversation
…y sh on Linux) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes Linux CI failures caused by relying on sh to expand ** globs in the npm test script by switching to an explicit test file path.
Changes:
- Update
npm testto runtest/util.test.tsexplicitly instead oftest/**/*.test.ts
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "refresh": "tsx src/index.ts --refresh", | ||
| "typecheck": "tsc --noEmit", | ||
| "test": "node --import=tsx/esm --test test/**/*.test.ts", | ||
| "test": "node --import=tsx/esm --test test/util.test.ts", |
There was a problem hiding this comment.
The test script is now hard-coded to a single file (test/util.test.ts), so any additional test files added later will be silently skipped unless the script is updated. If the goal is to avoid ** globbing on sh while still picking up multiple tests, consider using a POSIX-safe pattern like test/*.test.ts (or a directory-based invocation if supported) so new tests in test/ run automatically.
Suggested change
| "test": "node --import=tsx/esm --test test/util.test.ts", | |
| "test": "node --import=tsx/esm --test test/*.test.ts", |
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
npm testscript usedtest/**/*.test.tswhich relies on shell glob expansionsh),**globbing requiresglobstar(a bash extension) —shpasses it as a literal path and Node can't find ittest/util.test.ts(as long as we have one test file this is the right approach; add new files explicitly as the suite grows)Test plan
validatejob passes (typecheck + format:check + unit tests)npm run devwith TSCO.L (GBp) + SAP.DE (EUR) added totargetPortfolio— verify header shows· USD, prices are USD-magnitude, footer caveat appears, original currencies logged in consoleCloses the CI failure from the squash-merge of #10.
🤖 Generated with Claude Code