Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 [RUM-5100] Move away from testbuilder in test files - Pt 3 #2952

Merged

Conversation

N-Boutaib
Copy link
Contributor

@N-Boutaib N-Boutaib commented Aug 28, 2024

Motivation

Removing the last occurrences of TestBuilder and improving spec files by removing casting and using unified default RumConfiguration.

Changes

  • Removing TestBuilder
  • Using default RumConfig instead of {} as RumConfiguration

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.57%. Comparing base (e3f6d52) to head (057ef74).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/rum-core/test/mockContexts.ts 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2952      +/-   ##
==========================================
+ Coverage   93.50%   93.57%   +0.07%     
==========================================
  Files         271      273       +2     
  Lines        7637     7597      -40     
  Branches     1705     1707       +2     
==========================================
- Hits         7141     7109      -32     
+ Misses        496      488       -8     

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

Copy link

cit-pr-commenter bot commented Aug 28, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 161.21 KiB 161.21 KiB 0 B 0.00%
Logs 56.12 KiB 56.12 KiB 0 B 0.00%
Rum Slim 109.82 KiB 109.82 KiB 0 B 0.00%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.001 0.003 0.001
addaction 0.031 0.049 0.018
addtiming 0.001 0.001 0.000
adderror 0.032 0.060 0.028
startstopsessionreplayrecording 0.852 1.306 0.454
startview 0.974 1.159 0.185
logmessage 0.020 0.023 0.003
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 7.92 KiB 7.89 KiB -31 B
addaction 40.82 KiB 39.94 KiB -910 B
addtiming 6.85 KiB 6.27 KiB -594 B
adderror 45.28 KiB 46.01 KiB 742 B
startstopsessionreplayrecording 6.34 KiB 6.21 KiB -130 B
startview 340.50 KiB 347.79 KiB 7.28 KiB
logmessage 41.03 KiB 40.46 KiB -580 B

🔗 RealWorld

@N-Boutaib N-Boutaib marked this pull request as ready for review August 29, 2024 14:17
@N-Boutaib N-Boutaib requested a review from a team as a code owner August 29, 2024 14:17
packages/rum/src/boot/startRecording.spec.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/view/trackViews.spec.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/requestCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/requestCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/assembly.spec.ts Outdated Show resolved Hide resolved
packages/rum-core/src/boot/startRum.spec.ts Outdated Show resolved Hide resolved
packages/rum-core/src/boot/startRum.spec.ts Outdated Show resolved Hide resolved
@N-Boutaib N-Boutaib changed the title 🎨 Move away from testbuilder in test files - Pt 3 🎨 [RUM-5100] Move away from testbuilder in test files - Pt 3 Sep 5, 2024
@DataDog DataDog deleted a comment from datadog-datadog-prod-us1 bot Sep 5, 2024
packages/rum-core/src/domain/view/viewCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/recorderApi.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/recorderApi.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/recorderApi.spec.ts Outdated Show resolved Hide resolved
function setupRecorderApi({
sessionManager,
startSessionReplayRecordingManually,
}: { sessionManager?: RumSessionManager; startSessionReplayRecordingManually?: boolean } = {}) {

Choose a reason for hiding this comment

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

Code Quality Violation

Prop name (startSessionReplayRecordingManually) doesn't match rule (is|has) (...read more)

Enforces a consistent naming pattern for boolean props.

The pattern is: "^(is|has)[A-Z]([A-Za-z0-9]?)+" to enforce is and has prefixes.

View in Datadog  Leave us feedback  Documentation

@N-Boutaib N-Boutaib merged commit c6c0ad6 into main Sep 9, 2024
20 checks passed
@N-Boutaib N-Boutaib deleted the najib.boutaib/RUM-5100-move-away-from-test-builder-pt-3 branch September 9, 2024 10:18
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.

4 participants