Skip to content

✅ Simplify debugger probe test fixtures#4736

Open
watson wants to merge 1 commit into
mainfrom
watson/cleanup-tests
Open

✅ Simplify debugger probe test fixtures#4736
watson wants to merge 1 commit into
mainfrom
watson/cleanup-tests

Conversation

@watson
Copy link
Copy Markdown
Collaborator

@watson watson commented Jun 6, 2026

Motivation

Debugger domain specs were repeating full probe objects in many places, making tests noisy and harder to review. This also made it easy for test fixtures to drift from the probe shapes delivered by the UI/API.

Changes

  • Added a shared createProbe() spec helper for browser-debugger tests.
  • Replaced repeated probe literals in API, delivery API, and probe registry specs with the helper.
  • Kept overrides only where the test intentionally varies that property.
  • Made Probe.sampling optional to match the delivery schema/backend contract and existing runtime fallback handling.
  • Updated assertions to use shared default function ids or probe-derived ids instead of duplicated literals.

Test instructions

  • Run yarn test:unit --spec "packages/browser-debugger/src/domain/{api,probes,deliveryApi}.spec.ts"
  • Verify the targeted debugger unit specs pass.

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

@watson watson requested review from a team as code owners June 6, 2026 14:02
Copy link
Copy Markdown
Collaborator Author

watson commented Jun 6, 2026

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

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

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 171.86 KiB 171.86 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.31 KiB 54.31 KiB 0 B 0.00%
Rum Slim 129.69 KiB 129.69 KiB 0 B 0.00%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%

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

datadog-datadog-prod-us1 Bot commented Jun 6, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

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

Add a shared browser-debugger probe fixture and use it across debugger domain specs.
Keep tests focused on the fields they intentionally vary, while matching web-ui-style
probe defaults for file path, capture depth, sampling, and evaluation time.

Make Probe.sampling optional to reflect the delivery/schema contract and the runtime
fallback path.
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