Skip to content

dev: Add test setup and pre-commit linting#12

Merged
isTravis merged 5 commits into
mainfrom
tr/tests
May 11, 2026
Merged

dev: Add test setup and pre-commit linting#12
isTravis merged 5 commits into
mainfrom
tr/tests

Conversation

@isTravis
Copy link
Copy Markdown
Member

Add test suite, CI pipeline, and formatting enforcement

Testing

  • Added Vitest with happy-dom and @testing-library/react (per canonical stack)
  • Created vitest.config.ts with ~/ path alias and happy-dom environment
  • Added pnpm test / pnpm test:watch scripts
  • Unit tests for route-gen.ts — filesystem route conversion, dynamic params, sort ordering
  • Unit tests for src/lib/ark.ts — NCDA check digits, ARK ID minting, path parsing/roundtripping, ERC formatting

CI

  • New .github/workflows/ci.yml — runs lint, typecheck, and tests on every push/PR to main
  • Updated .github/workflows/deploy.yml — deploy now triggers via workflow_run after CI passes (instead of directly on push). Manual dispatch and releases bypass the gate.

Formatting

  • Fixed dprint.json — added missing plugins array (TypeScript, JSON, CSS via Malva)
  • Added pre-commit hook via simple-git-hooks + lint-staged — auto-formats staged files on commit

@isTravis isTravis merged commit d24dcff into main May 11, 2026
1 check passed
@isTravis isTravis deleted the tr/tests branch May 11, 2026 18:29
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.

1 participant