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 171.88 KiB 171.88 KiB 0 B 0.00%
Rum Profiler 7.88 KiB 7.88 KiB 0 B 0.00%
Rum Recorder 21.21 KiB 21.21 KiB 0 B 0.00%
Logs 54.33 KiB 54.33 KiB 0 B 0.00%
Rum Slim 129.71 KiB 129.71 KiB 0 B 0.00%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%

@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 | format   View in Datadog   GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ 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: 756a1f9 | 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 from ce47a57 to a14b363 Compare June 7, 2026 05:43
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 a14b363 to 756a1f9 Compare June 7, 2026 05:45
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