Skip to content

test(node): Refactor integration tests for honoIntegration#20397

Merged
s1gr1d merged 1 commit intodevelopfrom
sig/hono-tests
Apr 20, 2026
Merged

test(node): Refactor integration tests for honoIntegration#20397
s1gr1d merged 1 commit intodevelopfrom
sig/hono-tests

Conversation

@s1gr1d
Copy link
Copy Markdown
Member

@s1gr1d s1gr1d commented Apr 20, 2026

Each test run in the node-integration-tests runs a new node process so it should be avoided to have multiple test calls within one scenario.

The tests for the honoIntegration in Node were especially long-running because there were 480 test cases running a test. This was now changed to just two test scenarios while running the test matrix within this one test.

All 12 tests now pass in about 8 seconds.

Before: 480 test cases (2 routes x 5 methods x 3 paths x 8 tests x 2 modes), each spawning a separate Node process.
After: 12 test cases (6 per mode x 2 modes):

  1. Transaction tests (1 test per mode) — loops through all 90 route/method/path/type combinations inside a single test, making 90 sequential requests against one running server process.
  2. 500 error tests (1 test per mode) — loops through all 30 combinations, ignoring transactions and asserting error events.
  3. 4xx ignored error tests (4 tests per mode) — tests each error sub-path (/401, /402, /403, /does-not-exist) with a single representative combination (GET /sync) instead of all 120 combinations. The 4xx error-filtering behavior (statusCode >= 500 check in defaultShouldHandleError) is method/route/path-agnostic, so full matrix coverage isn't needed here.

@s1gr1d s1gr1d requested a review from mydea April 20, 2026 11:43
@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 25.88 kB - -
@sentry/browser - with treeshaking flags 24.35 kB - -
@sentry/browser (incl. Tracing) 43.77 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 45.47 kB - -
@sentry/browser (incl. Tracing, Profiling) 48.7 kB - -
@sentry/browser (incl. Tracing, Replay) 82.89 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.4 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 87.58 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 99.83 kB - -
@sentry/browser (incl. Feedback) 42.7 kB - -
@sentry/browser (incl. sendFeedback) 30.55 kB - -
@sentry/browser (incl. FeedbackAsync) 35.55 kB - -
@sentry/browser (incl. Metrics) 27.16 kB - -
@sentry/browser (incl. Logs) 27.29 kB - -
@sentry/browser (incl. Metrics & Logs) 27.98 kB - -
@sentry/react 27.62 kB - -
@sentry/react (incl. Tracing) 46.01 kB - -
@sentry/vue 30.7 kB - -
@sentry/vue (incl. Tracing) 45.58 kB - -
@sentry/svelte 25.89 kB - -
CDN Bundle 28.55 kB - -
CDN Bundle (incl. Tracing) 44.82 kB - -
CDN Bundle (incl. Logs, Metrics) 29.93 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 45.91 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.83 kB - -
CDN Bundle (incl. Tracing, Replay) 81.78 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 82.85 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 87.29 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 88.36 kB - -
CDN Bundle - uncompressed 83.4 kB - -
CDN Bundle (incl. Tracing) - uncompressed 134.03 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.55 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 137.44 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 210.91 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 251.26 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 254.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 264.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 267.56 kB - -
@sentry/nextjs (client) 48.54 kB - -
@sentry/sveltekit (client) 44.18 kB - -
@sentry/node-core 57.97 kB +0.01% +5 B 🔺
@sentry/node 174.81 kB +0.01% +7 B 🔺
@sentry/node - without tracing 97.93 kB +0.03% +21 B 🔺
@sentry/aws-serverless 115.16 kB +0.01% +8 B 🔺

View base workflow run

Copy link
Copy Markdown
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

nice one!

@s1gr1d s1gr1d merged commit 5d0d145 into develop Apr 20, 2026
43 checks passed
@s1gr1d s1gr1d deleted the sig/hono-tests branch April 20, 2026 13:50
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.

2 participants