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

🐛 Fix unit test format validation #598

Merged
merged 7 commits into from
Nov 4, 2020
Merged

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Oct 30, 2020

Motivation

events were validated on wrong schema 🤦

Changes

  • use the correct schema
  • make rum-events-format to track master
  • fix unit tests to pass validation

Testing

unit tests


I have gone over the contributing documentation.

@bcaudan bcaudan requested a review from a team as a code owner October 30, 2020 17:46
@codecov-io
Copy link

Codecov Report

Merging #598 into master will decrease coverage by 0.02%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #598      +/-   ##
==========================================
- Coverage   88.60%   88.57%   -0.03%     
==========================================
  Files          53       54       +1     
  Lines        2484     2495      +11     
  Branches      534      540       +6     
==========================================
+ Hits         2201     2210       +9     
- Misses        283      285       +2     
Impacted Files Coverage Δ
packages/rum/test/formatValidation.ts 80.00% <50.00%> (-3.34%) ⬇️
packages/rum/test/createRawRumEvent.ts 100.00% <100.00%> (ø)
packages/rum/src/transport/batch.ts 65.85% <0.00%> (-2.44%) ⬇️
packages/rum/src/browser/performanceCollection.ts 62.85% <0.00%> (-1.43%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e39eb3b...4dc53a9. Read the comment docs.

- prevent validation on events generated by completed tests by unsubscribing rawRumEventsV2 on cleanup
- ensure that mock clock is restored when all events are generated
- ensure to validate early and late events
@bcaudan bcaudan merged commit 4034756 into master Nov 4, 2020
@bcaudan bcaudan deleted the bcaudan/fix-unit-validation branch November 4, 2020 09:04
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