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

Implement an internal time type and Clock trait #4149

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Jan 27, 2025

This will add the capacity for the entire engine to mock time during tests. No impact on performance should be noticeable.

Fixed #4144

This will add the capacity for the entire engine to mock time during
tests. No impact on performance should be noticeable.

Fixed boa-dev#4144
@hansl hansl requested a review from jedel1043 January 27, 2025 19:38
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 61.40351% with 22 lines in your changes missing coverage. Please review.

Project coverage is 53.56%. Comparing base (6ddc2b4) to head (6e6d34c).
Report is 356 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/context/time.rs 68.29% 13 Missing ⚠️
core/engine/src/context/mod.rs 37.50% 5 Missing ⚠️
core/engine/src/object/builtins/jsdate.rs 0.00% 3 Missing ⚠️
core/engine/src/builtins/date/mod.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4149      +/-   ##
==========================================
+ Coverage   47.24%   53.56%   +6.31%     
==========================================
  Files         476      488      +12     
  Lines       46892    48923    +2031     
==========================================
+ Hits        22154    26204    +4050     
+ Misses      24738    22719    -2019     

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

@hansl hansl requested a review from a team January 27, 2025 19:57
A negative duration is invalid.
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.

Newtypes JsInstant and JsDuration to allow Boa, hosts and libraries a single (wall) clock type
1 participant