Skip to content

test(deno): Type-check Deno unit tests - #25227

Merged
JPeer264 merged 1 commit into
getsentry:developfrom
Philip-Nwabuwa:fix/deno-test-type-check
Oct 9, 2026
Merged

JPeer264 merged 1 commit into
getsentry:developfrom
Philip-Nwabuwa:fix/deno-test-type-check

Conversation

@Philip-Nwabuwa

Copy link
Copy Markdown
Contributor

deno test runs with --no-check, and lint:types only covers src, so type errors in packages/deno/test never failed CI. This adds a test:types step that runs before test:unit, and fixes the five type errors it surfaced.

Simply dropping --no-check doesn't work in the monorepo: workspace packages (@sentry/core, @sentry/server-utils, ...) are symlinked into node_modules, so Deno treats their emitted .d.ts files as local modules and can't resolve their extensionless relative imports. Running with --unstable-sloppy-imports resolves those and also picks up build/esm/*.d.ts for the tests' ../build/esm/index.js imports, so the tests are checked against the SDK's real types.

The check runs as a separate test:types step so the test run itself keeps Deno's strict runtime resolution and still catches a broken specifier in the build output. It adds roughly 3.5s on a cold cache.

dev-packages/deno-integration-tests also runs with --no-check; I left that for a follow-up.

Fixes #23899

`deno test` runs with `--no-check`, and `lint:types` only covers `src`, so
type errors in `packages/deno/test` never failed CI.

Simply dropping `--no-check` doesn't work in the monorepo: workspace
packages (`@sentry/core`, `@sentry/server-utils`, ...) are symlinked into
`node_modules`, so Deno treats their emitted `.d.ts` files as local modules
and can't resolve their extensionless relative imports. Running with
`--unstable-sloppy-imports` resolves those and also picks up
`build/esm/*.d.ts` for the tests' `../build/esm/index.js` imports, so the
tests are checked against the SDK's real types.

The check runs as a separate `test:types` step so the test run itself keeps
Deno's strict runtime resolution and still catches a broken specifier in
the build output.

Fixes getsentry#23899
@github-actions github-actions Bot added the external PR from an external contributor label Oct 9, 2026
@Philip-Nwabuwa
Philip-Nwabuwa marked this pull request as ready for review October 9, 2026 11:37
@Philip-Nwabuwa
Philip-Nwabuwa requested a review from a team as a code owner October 9, 2026 11:37
@Philip-Nwabuwa
Philip-Nwabuwa requested review from andreiborza and mydea and removed request for a team October 9, 2026 11:37
@JPeer264
JPeer264 self-requested a review October 9, 2026 11:38

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing thanks for taking this one over.

@JPeer264
JPeer264 merged commit 0df3903 into getsentry:develop Oct 9, 2026
80 checks passed
@Philip-Nwabuwa

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review 👏

msonnb pushed a commit that referenced this pull request Oct 9, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #25227

Co-authored-by: JPeer264 <10677263+JPeer264@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deno: tests run with --no-check

2 participants