test(node-integration-tests): Type-check test suites in CI#22054
Merged
mydea merged 1 commit intoJul 8, 2026
Merged
Conversation
andreiborza
approved these changes
Jul 8, 2026
andreiborza
left a comment
Member
There was a problem hiding this comment.
What about the other integration test suites we have?
Member
Author
we can look at those in a follow up I'd say! node-core is going away so would not bother with this, but makes sense to do the same for bun, deno and cloudflare I suppose :) |
4ae9281 to
2e57e43
Compare
Contributor
size-limit report 📦
|
Lms24
approved these changes
Jul 8, 2026
JPeer264
approved these changes
Jul 8, 2026
JPeer264
left a comment
Member
There was a problem hiding this comment.
LGTM. I second what @andreiborza meant, but follow up is fine as well
509ce9d to
9f80421
Compare
The `suites/**` test files were never type-checked: `yarn type-check` runs a bare `tsc` (whose config only includes `utils/**` + `src/**`) and vitest transpiles with esbuild, so type errors only ever showed up in the editor. This adds a CI gate that type-checks the suites and fixes the latent errors it surfaced. - Add `type-check:src` / `type-check:test` scripts (both `--noEmit`) and run `yarn type-check` for the package in the Lint CI job. - Relax `noUncheckedIndexedAccess` for test code and exclude the Prisma CLI config (its runtime shape intentionally differs from `@prisma/config`'s types). - Give `createTestServer` an explicit return type so chained `.get()` calls infer their `headers` callback parameter. - Add a `getStringAttributeValue` helper to narrow union-typed span attribute values in the AI tracing assertions. - Fix the vitest reporter config to the valid nested-tuple form. Relies on `attributes` being required on `SerializedStreamedSpan` (see the change this is stacked on). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2e57e43 to
3ceac73
Compare
49 tasks
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.
The
suites/**test files innode-integration-testswere never type-checked, so type errors only ever surfaced in the editor — never in CI. This adds a CI gate that type-checks the suites and fixes the ~2000 latent errors it surfaced.Root cause
yarn type-checkruns a baretsc, whosetsconfig.jsononly includesutils/**andsrc/**— notsuites/**.yarn test(vitest) transpiles with esbuild, which strips types without checking them.With nothing exercising the suite types, errors accumulated silently.
Changes
type-check:src/type-check:testscripts (both--noEmit, so a bare run can't scatter.jsnext to sources) and runyarn type-checkfor the package in the Lint CI job.noUncheckedIndexedAccessfor test code — indexing into span attributes/arrays that are known to exist at that point shouldn't require!everywhere — and exclude the Prisma CLI config, whose runtime shape intentionally differs from@prisma/config's exported types.createTestServeran explicit return type so chained.get()calls infer theirheaderscallback parameter (previously only the first.get()was typed).getStringAttributeValuehelper to narrow union-typed span attribute values in the AI tracing assertions (includes/startsWith/match/length).All changes are type-level / test-scoped and runtime-transparent.
Stacked on top of #22052, which makes
attributesrequired onSerializedStreamedSpan— merge that one first.