Skip to content

test: run the top-level test files in npm test - #308

Draft
dhensby wants to merge 1 commit into
tediousjs:masterfrom
dhensby:test/run-all-test-files
Draft

dhensby wants to merge 1 commit into
tediousjs:masterfrom
dhensby:test/run-all-test-files

Conversation

@dhensby

@dhensby dhensby commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

npm test now runs test/connection-string.test.ts. Before, it ran 53 of the 70 tests on every Node version in CI. Only the coverage job ran all 70.

Changes

  • npm test adds the test/*.test.ts pattern, as test:coverage already does. Under sh, test/**/*.test.ts matches only the files one folder down, so it skipped the top-level test file.
  • Both patterns stay as shell globs, because Node 20 does not expand a quoted glob in --test.

Testing

  • I ran npm test and npm run test:workflow under dash, sh and zsh on Node 20, 22, 24 and 26. Each run gives 70 tests from 4 files, and each file runs once. Before, dash and sh gave 53 tests from 3 files.
  • The latest CI run on master shows 53 tests for each matrix version and 70 for the coverage job.

The commit type is test, so this does not cut a release.

🤖 Generated with Claude Code

Under sh, `test/**/*.test.ts` matches only the files one folder down.
So `npm test`, which CI runs on every Node version in the matrix, did
not run test/connection-string.test.ts. Only the coverage job ran it.

Add `test/*.test.ts`, as test:coverage already does. Keep both patterns
as shell globs, because Node 20 does not expand a quoted glob in
--test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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