Enforce TypeScript type-checking for tests in validation and CI#113
Merged
Conversation
…e README with typecheck commands
mborne
approved these changes
May 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens the repo’s validation pipeline by ensuring TypeScript type-checking also covers the test suite, and by making CI/release workflows run the same fast verification path. It also aligns Vitest runtime behavior with explicit imports by disabling global test APIs.
Changes:
- Add a dedicated
typecheck:testcommand and run it as part ofverify:fast, and update CI/release workflows to useverify:fast. - Expand
tsconfig.test.jsonscope to type-check Vitest config files as well astest/**/*. - Disable
globalsin Vitest configs and update tests/helpers to importdescribe/it/expect/viexplicitly.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.integration.config.mts | Disable Vitest globals for integration tests. |
| vitest.e2e.config.mts | Disable Vitest globals for E2E tests. |
| vitest.config.mts | Disable Vitest globals for unit tests. |
| tsconfig.test.json | Include Vitest config files in the test type-check scope. |
| test/tools/wfs/searchTypes.test.ts | Import Vitest APIs explicitly. |
| test/tools/wfs/getFeatures.test.ts | Consolidate Vitest imports (incl. vi) for globals-off mode. |
| test/tools/wfs/getFeatureById.test.ts | Consolidate Vitest imports (incl. vi) for globals-off mode. |
| test/tools/wfs/describeType.test.ts | Import Vitest APIs explicitly. |
| test/tools/urbanisme.test.ts | Import Vitest APIs explicitly. |
| test/tools/strict-input.test.ts | Import Vitest APIs explicitly. |
| test/tools/geocode.test.ts | Import Vitest APIs explicitly. |
| test/tools/cadastre.test.ts | Import Vitest APIs explicitly. |
| test/tools/base-tool-error.test.ts | Import Vitest APIs explicitly. |
| test/tools/altitude.test.ts | Import Vitest APIs explicitly. |
| test/tools/adminexpress.test.ts | Import Vitest APIs explicitly. |
| test/integration/helpers/level1-assertions.ts | Adjust assertions to satisfy TS under stricter checking. |
| test/helpers/wfs_engine/spatialFilter.test.ts | Import Vitest APIs explicitly. |
| test/helpers/wfs_engine/spatialCql.test.ts | Import Vitest APIs explicitly. |
| test/helpers/wfs_engine/response.test.ts | Import Vitest APIs explicitly. |
| test/helpers/wfs_engine/request.test.ts | Import Vitest APIs explicitly. |
| test/helpers/wfs_engine/queryPreparation.test.ts | Import Vitest APIs explicitly. |
| test/helpers/wfs_engine/geometry.test.ts | Import Vitest APIs explicitly. |
| test/helpers/wfs_engine/execution.test.ts | Import Vitest APIs explicitly (incl. hooks). |
| test/helpers/toolError.test.ts | Consolidate Vitest imports (incl. vi) for globals-off mode. |
| test/helpers/http.test.ts | Import Vitest APIs explicitly (incl. hooks). |
| test/helpers/distance.test.ts | Import Vitest APIs explicitly. |
| test/gpf/wfs-schema-catalog.test.ts | Import Vitest APIs explicitly (incl. hooks). |
| test/gpf/urbanisme.test.ts | Import Vitest APIs explicitly (incl. hooks/vi). |
| test/gpf/parcellaire-express.test.ts | Import Vitest APIs explicitly (incl. hooks/vi). |
| test/gpf/geocode.test.ts | Import Vitest APIs explicitly. |
| test/gpf/altitude.test.ts | Import Vitest APIs explicitly. |
| test/gpf/adminexpress.test.ts | Import Vitest APIs explicitly (incl. hooks/vi). |
| README.md | Document typecheck commands and verify:fast behavior. |
| package.json | Add typecheck:test and include it in verify:fast. |
| .github/workflows/npm-publish.yml | Run verify:fast in release/publish workflow. |
| .github/workflows/node.js.yml | Run verify:fast in CI workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #108
This PR enforces TypeScript type-checking for the test suite as part of the standard validation flow.
It keeps application and test type-checking as separate commands (
typecheckandtypecheck:test), adds test type-checking toverify:fast, and updates CI/release workflows to run that validation path. It also extendstsconfig.test.jsonto cover bothtest/**/*and the Vitest config files, so test code and test tooling are checked earlier and more consistently during refactors.