Skip to content

✅ Simplify debugger API spec call sites#4741

Draft
watson wants to merge 1 commit into
watson/support-non-error-thrownfrom
watson/cleanup-tests2
Draft

✅ Simplify debugger API spec call sites#4741
watson wants to merge 1 commit into
watson/support-non-error-thrownfrom
watson/cleanup-tests2

Conversation

@watson
Copy link
Copy Markdown
Collaborator

@watson watson commented Jun 7, 2026

Motivation

The debugger API specs often passed {} for placeholder this, args, or locals values. Those call sites were harder to read because it was not obvious which empty object represented which parameter.

Changes

  • Added a shared thisArg test fixture for placeholder this values.
  • Removed redundant trailing empty objects where onEntry, onReturn, and onThrow already provide default values.
  • Left meaningful object literals in place when they are part of the test data or expectations.

Test instructions

  • yarn test:unit --spec packages/browser-debugger/src/domain/api.spec.ts

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

Copy link
Copy Markdown
Collaborator Author

watson commented Jun 7, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Jun 7, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum N/A 171.90 KiB N/A N/A N/A
Rum Profiler N/A 7.88 KiB N/A N/A N/A
Rum Recorder N/A 21.21 KiB N/A N/A N/A
Logs N/A 54.36 KiB N/A N/A N/A
Rum Slim N/A 129.74 KiB N/A N/A N/A
Worker N/A 22.96 KiB N/A N/A N/A

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented Jun 7, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/browser-sdk | unit-bs: [safari-desktop]   View in Datadog   GitLab

🧪 1 Test failed

serializeNode for stylesheets for <link rel="stylesheet"> elements serializes the element when the sheet is unavailable from Safari 14.1.2 (Mac OS 10.15.7)   View in Datadog (Fix with Cursor)
Error: Timeout - Async function did not complete within 10000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 8638)
<Jasmine>

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.77% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4ded1f6 | Docs | Datadog PR Page | Give us feedback!

@watson watson force-pushed the watson/support-non-error-thrown branch from 9c9b8ac to f32c7a4 Compare June 7, 2026 05:43
@watson watson force-pushed the watson/cleanup-tests2 branch 3 times, most recently from 756a1f9 to b25f283 Compare June 8, 2026 06:18
@watson watson force-pushed the watson/support-non-error-thrown branch 2 times, most recently from ae7762d to 9b05c9e Compare June 8, 2026 12:21
@watson watson force-pushed the watson/cleanup-tests2 branch from b25f283 to e8fc165 Compare June 8, 2026 12:21
@watson watson force-pushed the watson/support-non-error-thrown branch from 9b05c9e to f6260d9 Compare June 8, 2026 12:23
@watson watson force-pushed the watson/cleanup-tests2 branch from e8fc165 to e5f2a0a Compare June 8, 2026 12:23
@watson watson force-pushed the watson/support-non-error-thrown branch from f6260d9 to b4c641f Compare June 8, 2026 12:45
@watson watson force-pushed the watson/cleanup-tests2 branch from e5f2a0a to 656b091 Compare June 8, 2026 12:45
@watson watson force-pushed the watson/support-non-error-thrown branch from b4c641f to eb2aef1 Compare June 8, 2026 13:15
@watson watson force-pushed the watson/cleanup-tests2 branch from 656b091 to ce161a8 Compare June 8, 2026 13:15
@watson watson force-pushed the watson/support-non-error-thrown branch from eb2aef1 to f4a6786 Compare June 8, 2026 17:57
@watson watson force-pushed the watson/cleanup-tests2 branch 2 times, most recently from b84e461 to 8ee7eb9 Compare June 8, 2026 18:00
@watson watson force-pushed the watson/support-non-error-thrown branch from f4a6786 to 753205e Compare June 8, 2026 18:00
@watson watson force-pushed the watson/cleanup-tests2 branch 2 times, most recently from e8a449e to 42ea55b Compare June 8, 2026 19:01
Use a named `thisArg` fixture where tests pass a placeholder `this` value.
Also rely on default parameters for omitted `args` and `locals` so call sites
highlight only the values relevant to each expectation.
@watson watson force-pushed the watson/cleanup-tests2 branch from 42ea55b to 4ded1f6 Compare June 8, 2026 19:29
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.

1 participant