Skip to content

docs: correct guidance on test filtering#1298

Open
rexxars wants to merge 1 commit into
mainfrom
docs/filtering
Open

docs: correct guidance on test filtering#1298
rexxars wants to merge 1 commit into
mainfrom
docs/filtering

Conversation

@rexxars

@rexxars rexxars commented Jun 12, 2026

Copy link
Copy Markdown
Member

Agent docs used an incorrect --filter flag, and also could use some help on better ways of running individual tests.


Note

Low Risk
Documentation-only changes to AGENTS.md with no runtime or test behavior impact.

Overview
Updates AGENTS.md so agent-oriented test docs match how Vitest is actually invoked in this repo.

Package-scoped runs now use pnpm test --project=<pkg> instead of the incorrect --filter flag (pnpm --filter is for turbo/package scripts, not Vitest project selection). The quick reference clarifies that a test file argument is a path substring match, with a shorter example path.

The “Running tests” section adds practical guidance for single-file runs (unique path fragment) and single-test runs via -t regex or line number with full path. The test-failure workflow and Cursor Cloud notes are aligned to use --project for scoped package runs.

Reviewed by Cursor Bugbot for commit 744bb57. Bugbot is set up for automated code reviews on this repo. Configure here.

@rexxars rexxars requested a review from a team as a code owner June 12, 2026 17:48
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Stats — @sanity/cli

Compared against main (47e97a3a)

@sanity/cli

Metric Value vs main (47e97a3)
Internal (raw) 2.1 KB -
Internal (gzip) 799 B -
Bundled (raw) 11.13 MB -
Bundled (gzip) 2.10 MB -
Import time 863ms +3ms, +0.3%

bin:sanity

Metric Value vs main (47e97a3)
Internal (raw) 782 B -
Internal (gzip) 423 B -
Bundled (raw) 9.87 MB -
Bundled (gzip) 1.77 MB -
Import time 1.93s -16ms, -0.8%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

📦 Bundle Stats — @sanity/cli-core

Compared against main (47e97a3a)

Metric Value vs main (47e97a3)
Internal (raw) 98.2 KB -
Internal (gzip) 23.3 KB -
Bundled (raw) 21.70 MB -
Bundled (gzip) 3.45 MB -
Import time 760ms -8ms, -1.0%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

📦 Bundle Stats — create-sanity

Compared against main (47e97a3a)

Metric Value vs main (47e97a3)
Internal (raw) 908 B -
Internal (gzip) 483 B -
Bundled (raw) 931 B -
Bundled (gzip) 491 B -
Import time ❌ ChildProcess denied: node -
Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@filmaj

filmaj commented Jun 12, 2026

Copy link
Copy Markdown
Member

The split test:unit vs. test:integration run scripts now also impact this. test now invokes both via pnpm test:unit && pnpm test:integration, which means any flags appended to the test command only apply to test:integration. Probably OK in the short term, but long-term we will either need a script to wrap invocation of both suites, or make the contributing and agent docs more explicit about the two different test suites.

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