You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quote the src/**/*.spec.ts argument in every package test script so Node expands it, not the shell. Today the shell expands it in five of six packages, and the failure mode is silently skipped tests rather than an error.
Every package under packages/ leaves it unquoted, so the shell expands it before Node sees it. Bash without globstar treats ** as a single *, so src/**/*.spec.ts means src/*/*.spec.ts — exactly one directory deep.
It happens to work right now only because each package sits at one extreme:
post-kit-email has 10 nested specs and none at the top level, so shell expansion finds them all.
post-kit-client, -compiler, -publisher, -types each have one top-level spec and none nested. The pattern matches nothing, so bash passes the literal string through and Node's own glob resolves it correctly.
The moment any package holds specs at both depths, the shell silently wins and one set stops running:
Add src/anything.spec.ts to post-kit-email → the shell still matches only the 10 nested files and the new one never runs.
Add src/sub/anything.spec.ts to post-kit-client → the shell now matches only the nested file and src/client.spec.tsstops being executed.
Neither case errors. The suite passes, reporting fewer tests, and nothing points at the cause. AGENTS.md tells contributors to put specs next to the code, which makes hitting this a matter of time.
Scope
Quote the glob in the test script of all five packages under packages/, matching the form already used in apps/api.
Leave the rest of each script (pre-build steps, tsc -p tsconfig.spec.json) unchanged.
Constraints
No test files move and no test content changes.
Do not switch test runners or add a glob dependency; Node's --test already handles the pattern.
Keep every package's script shape consistent with the others.
Acceptance criteria
Every packages/*/package.jsontest script quotes the glob.
pnpm test at the root passes, and each package reports the same or greater number of tests than before the change.
A spec added at a second depth in any package is picked up — verify manually in one package with a temporary throwaway spec, confirm it runs, then remove it.
pnpm lint, pnpm build, and CI all pass.
Agent implementation notes
Compare against the working apps/api script. Verify by counting reported tests before and after — that count is the actual acceptance signal, not a green tick.
Goal
Quote the
src/**/*.spec.tsargument in every packagetestscript so Node expands it, not the shell. Today the shell expands it in five of six packages, and the failure mode is silently skipped tests rather than an error.The problem
apps/api/package.jsonquotes the glob correctly:Every package under
packages/leaves it unquoted, so the shell expands it before Node sees it. Bash withoutglobstartreats**as a single*, sosrc/**/*.spec.tsmeanssrc/*/*.spec.ts— exactly one directory deep.It happens to work right now only because each package sits at one extreme:
post-kit-emailhas 10 nested specs and none at the top level, so shell expansion finds them all.post-kit-client,-compiler,-publisher,-typeseach have one top-level spec and none nested. The pattern matches nothing, so bash passes the literal string through and Node's own glob resolves it correctly.The moment any package holds specs at both depths, the shell silently wins and one set stops running:
src/anything.spec.tstopost-kit-email→ the shell still matches only the 10 nested files and the new one never runs.src/sub/anything.spec.tstopost-kit-client→ the shell now matches only the nested file andsrc/client.spec.tsstops being executed.Neither case errors. The suite passes, reporting fewer tests, and nothing points at the cause. AGENTS.md tells contributors to put specs next to the code, which makes hitting this a matter of time.
Scope
testscript of all five packages underpackages/, matching the form already used inapps/api.packages/post-kit-editorif Scaffold @singleton-sd/post-kit-editor package #36 has merged.tsc -p tsconfig.spec.json) unchanged.Constraints
--testalready handles the pattern.Acceptance criteria
packages/*/package.jsontestscript quotes the glob.pnpm testat the root passes, and each package reports the same or greater number of tests than before the change.pnpm lint,pnpm build, and CI all pass.Agent implementation notes
Compare against the working
apps/apiscript. Verify by counting reported tests before and after — that count is the actual acceptance signal, not a green tick.Branch:
fix/<issue-number>-quote-test-globs.