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

refactor(testing): remove FakeTime.start setter #5050

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Conversation

iuioiua
Copy link
Collaborator

@iuioiua iuioiua commented Jun 16, 2024

@iuioiua iuioiua requested a review from kt3k as a code owner June 16, 2024 02:13
@iuioiua iuioiua changed the title BREAKING(testing): remove FakeTime.start setter refactor(testing): remove FakeTime.start setter Jun 16, 2024
Copy link

codecov bot commented Jun 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.83%. Comparing base (635e062) to head (76223e1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5050      +/-   ##
==========================================
- Coverage   92.20%   91.83%   -0.38%     
==========================================
  Files         487      487              
  Lines       38855    38854       -1     
  Branches     5443     5410      -33     
==========================================
- Hits        35827    35681     -146     
- Misses       2973     3116     +143     
- Partials       55       57       +2     

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

@kt3k
Copy link
Member

kt3k commented Jun 17, 2024

By this change, the error message changes from:

error: Uncaught (in promise) Error: cannot change start time after initialization

To:

error: Uncaught (in promise) TypeError: Cannot set property start of #<FakeTime> which has only 

I slightly prefer the 1st one because it explicitly says it's intentional by design. The latter sounds like the case is not considered by the author. WDYT?

@iuioiua
Copy link
Collaborator Author

iuioiua commented Jun 17, 2024

I see having a method that is not useful as having poor design. I've added a note to counteract any possible confusion.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@iuioiua iuioiua merged commit b5f9e34 into main Jun 18, 2024
12 checks passed
@iuioiua iuioiua deleted the remove-faketime-start branch June 18, 2024 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants