Skip to content

test: run every package's tests with one vitest glob - #281

Merged
lolaaimar merged 1 commit into
chore/217-unused-sim-membersfrom
test/vitest-workspace-glob
Nov 25, 2026
Merged

lolaaimar merged 1 commit into
chore/217-unused-sim-membersfrom
test/vitest-workspace-glob

Conversation

@nicolasLuduena

@nicolasLuduena nicolasLuduena commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacked on #282 (stack: #291 → #292 → #293 → #294 → #285 → #283 → #282 → #281); it shares no files with them.

The root vitest.config.ts listed one include glob per package. CI runs npx vitest run from the root, so a package missing from the list has its tests skipped with no error. packages/attestor is missing today. This PR replaces the list with one glob:

 include: [
-  'packages/contracts/**/*.test.ts',
-  'packages/cardano/**/*.test.ts',
-  'packages/core/**/*.test.ts',
-  'packages/client/**/*.test.ts',
-  'packages/zk-tls/**/*.test.ts',
+  'packages/*/test/**/*.test.ts',
 ],

Every test file in the repo is under its package's test/ directory, so a new package is picked up without editing the config. configDefaults.exclude still drops node_modules and dist. No doc tells contributors to edit the list, so no doc changes.

Evidence

  • Before: npx vitest list --filesOnly lists 33 files, and a test in packages/attestor/test/ is not among them.
    After: the same 33 files, and the packages/attestor/test/ test is listed. I added that test only for this check and deleted it.

On the full stack, npm run types and npm run check pass, and the full suite passes: 31 files passed, 2 skipped; 776 tests passed, 4 skipped (the opt-in live checks).

No verification skill in this repo.

Merge Danger

Door: two-way

Blast Radius: CI

The same tests run today. Any *.test.ts file that lands in a package's test/ directory runs from now on, including in a package nobody remembered to list.

@nicolasLuduena
nicolasLuduena force-pushed the test/vitest-workspace-glob branch from cbd3652 to adf1643 Compare November 25, 2026 02:19
@nicolasLuduena
nicolasLuduena changed the base branch from main to chore/217-unused-sim-members November 25, 2026 02:19

@nicolasLuduena nicolasLuduena left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lgtm

@lolaaimar

Copy link
Copy Markdown
Contributor

lgtm

@lolaaimar
lolaaimar force-pushed the test/vitest-workspace-glob branch from adf1643 to 842bc0e Compare November 25, 2026 19:49
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fcf8124c-66ff-401a-816c-3091960edcb7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@lolaaimar
lolaaimar force-pushed the test/vitest-workspace-glob branch from 842bc0e to 1bfa803 Compare November 25, 2026 20:47
@lolaaimar
lolaaimar merged commit 84750ee into main Nov 25, 2026
3 checks passed
@lolaaimar
lolaaimar deleted the test/vitest-workspace-glob branch November 25, 2026 20:50
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