Skip to content

test: add test case for deserializing an unsupported enum value#246

Open
mcnulty-fp wants to merge 5 commits into
mainfrom
test/INTER-2242-unsupported-enum-value
Open

test: add test case for deserializing an unsupported enum value#246
mcnulty-fp wants to merge 5 commits into
mainfrom
test/INTER-2242-unsupported-enum-value

Conversation

@mcnulty-fp

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0959762

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a regression test in the mocked-response suite to ensure getEvent() can deserialize and return events even when the API response contains an enum value not currently supported by the SDK types.

Changes:

  • Clear the fetch mock call history before each test for better isolation.
  • Add a new test case that returns an event with an unsupported proxy_details.proxy_type value and asserts the client returns it as-is.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/mocked-responses-tests/getEventTests.spec.ts
Comment thread tests/mocked-responses-tests/getEventTests.spec.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 100% 183/183
🟢 Branches 100% 63/63
🟢 Functions 100% 35/35
🟢 Lines 100% 181/181

Test suite run success

76 tests passing in 9 suites.

Report generated by 🧪jest coverage report action from 0959762

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 100 100 100 100
🟢  src 100 100 100 100
🟢   index.ts 100 100 100 100
🟢   sealedResults.ts 100 100 100 100
🟢   serverApiClient.ts 100 100 100 100
🟢   types.ts 100 100 100 100
🟢   urlUtils.ts 100 100 100 100
🟢   webhook.ts 100 100 100 100
🟢  src/errors 100 100 100 100
🟢   apiErrors.ts 100 100 100 100
🟢   handleErrorResponse.ts 100 100 100 100
🟢   toError.ts 100 100 100 100
🟢   unsealError.ts 100 100 100 100

@JuroUhlar JuroUhlar marked this pull request as ready for review June 29, 2026 21:50
@JuroUhlar

Copy link
Copy Markdown
Contributor

@mcnulty-fp Thanks for this PR! I polished some minor details, ready for review

@mcnulty-fp mcnulty-fp left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM! GitHub won't let me approve for some reason so looks like we'll need another codeowner to approve too.

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.

3 participants