Skip to content

test(graphql): cover custom websocket handshake headers #1026 - #1534

Open
AzazelSensei wants to merge 1 commit into
zino-hofmann:mainfrom
AzazelSensei:test-1026-websocket-custom-headers
Open

AzazelSensei wants to merge 1 commit into
zino-hofmann:mainfrom
AzazelSensei:test-1026-websocket-custom-headers

Conversation

@AzazelSensei

Copy link
Copy Markdown

SocketClient already accepts custom headers, but we never checked that they actually go out on the handshake.

I changed the echo mock so it keeps the HTTP upgrade headers, then added a test that myHeader is present. That was the leftover FIXME in websocket_test.dart.

Fixes #1026

SocketClient already takes custom headers, but the echo mock dropped
the HTTP upgrade so we never asserted them. Keep handshake headers on
the mock and check that myHeader is sent.

Fixes zino-hofmann#1026
@codecov

codecov Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.83%. Comparing base (f6fa354) to head (081c201).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1534   +/-   ##
=======================================
  Coverage   65.83%   65.83%           
=======================================
  Files          43       43           
  Lines        2096     2096           
=======================================
  Hits         1380     1380           
  Misses        716      716           
Flag Coverage Δ
graphql 67.38% <ø> (ø)
graphql_flutter 65.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

Adding custom header test, this required to change a little bit the mock server

1 participant