Skip to content

fix(ci): use explicit test path — glob not expanded by sh on Linux#11

Merged
furic merged 1 commit intomainfrom
feat/issue-7-currency-support
Apr 28, 2026
Merged

fix(ci): use explicit test path — glob not expanded by sh on Linux#11
furic merged 1 commit intomainfrom
feat/issue-7-currency-support

Conversation

@furic
Copy link
Copy Markdown
Owner

@furic furic commented Apr 28, 2026

Summary

  • The npm test script used test/**/*.test.ts which relies on shell glob expansion
  • On Linux CI (sh), ** globbing requires globstar (a bash extension) — sh passes it as a literal path and Node can't find it
  • Fixed by using the explicit path test/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

  • CI validate job passes (typecheck + format:check + unit tests)
  • npm run dev with TSCO.L (GBp) + SAP.DE (EUR) added to targetPortfolio — verify header shows · USD, prices are USD-magnitude, footer caveat appears, original currencies logged in console
  • Revert config

Closes the CI failure from the squash-merge of #10.

🤖 Generated with Claude Code

…y sh on Linux)

Co-Authored-By: Claude <noreply@anthropic.com>
@furic furic merged commit ddffe32 into main Apr 28, 2026
1 check passed
@furic furic deleted the feat/issue-7-currency-support branch April 28, 2026 04:02
@furic furic self-assigned this Apr 28, 2026
@furic furic requested a review from Copilot April 28, 2026 04:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test to run test/util.test.ts explicitly instead of test/**/*.test.ts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
"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",
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants