Repository navigation
Repository has no test infrastructure or CI: zero test files, no test script, and no workflow gates #10
Description
Labels / Complexity: tests,infrastructure · High — 21## Problem
The repository has no test infrastructure and no CI. package.json defines no test script (only dev, build, start, lint, type-check, storybook, and build-storybook), a search for *.test.* and *.spec.* files returns nothing, and .github/workflows does not exist. The only verification a contributor can run is npm run type-check and npm run lint.
- Pure logic is unguarded: the amount and asset formatting in
lib/stellar/formatting.ts, address validation inlib/stellar/validation.ts, error mapping inlib/stellar/errorHandler.ts, the cache inlib/cache/cacheManager.ts, the stores understore/, and the image utilities inutils/imageUpload.tshave zero regression protection. - PRs cannot be judged on evidence: reviewers and the funding program have no test output to distinguish a working change from a breaking one.
- Behavioral fixes regress silently: the issues in this milestone (JWT verification, draft storage, share stats, admin auth) each require tests to be considered done, and none can be written today.
Why this is architecturally hard
- The runner choice matters: the repo already depends on Storybook 8 and
@storybook/test, and the test setup must coexist with the existingstorybookscripts rather than fight them. - Component tests need a jsdom environment and React Testing Library, while the repo has no testing dependencies at all; the test stack must be added without disturbing the Next.js 14 build.
- Zustand stores need a test store setup, and
lib/api/interceptors.tsattaches axios interceptors to a shared client, so any store or interceptor test needs a mocked transport that does not leak state between cases. - The CI workflow must run type-check, lint, build, and test with no secrets and no network beyond package installation, so the pipeline is reproducible for external contributors.
Proposed design
Introduce a runner (vitest or jest, decided in the PR with rationale), add a test script, write unit tests for the pure-logic modules above, and add a GitHub Actions workflow that gates on type-check, lint, build, and test.
Acceptance criteria
npm testexists and runs green in a fresh clone with onlynpm install.- Unit tests cover
lib/stellar/formatting.ts,lib/stellar/validation.ts,lib/stellar/errorHandler.ts,lib/cache/cacheManager.ts,store/authStore.ts,store/uiStore.ts, andutils/imageUpload.ts. - A GitHub Actions workflow under
.github/workflows/runs type-check, lint, build, and test on push and pull request, with no required secrets. - The workflow is the only gate; test failures block the run.
- README documents how to run the tests.
Out of scope
End-to-end browser tests and snapshot tests for every component; the unit-test foundation and CI gates are the deliverable.
Getting started
- Read
package.json,tsconfig.json,.eslintrc.json, and the modules listed above. - Verify the current state with
npm run type-checkandnpm run lint. - Pattern-match the pure functions in
lib/stellar/formatting.ts(e.g.toStroops,fromStroops,truncateAddress) as the first natural candidates for tests.
Good first files to read: package.json, lib/stellar/formatting.ts, lib/cache/cacheManager.ts, store/uiStore.ts.
Activity
codefather2026 commentedon Aug 23, 2026
Hi maintainer, i will like to solve this issue
nasalehj commentedon Aug 23, 2026
Hi Maintainer
please may i fix this issue
grantfox-oss commentedon Aug 23, 2026
🦊 GrantFox — @nasalehj has been assigned to this issue as part of the Third Campaign campaign!
Next steps:
Closes #10)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Aug 23, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!
@nasalehj's PR #20 was approved and merged by @ibrahimmosouf-png.
🏆 @nasalehj: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (331 total points). Track your full progress on GrantFox.
👏 Great work, @nasalehj! Keep contributing to OrbitChainLabs.