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

♻️ test-performance.js: differentiate between relative and absolute time. #26568

Merged
merged 3 commits into from
Jan 31, 2020

Conversation

samouri
Copy link
Member

@samouri samouri commented Jan 30, 2020

summary

  • Configured lolex to simulate Date.now() to begin at 100 instead of at 0. When it was 0, it became impossible to test the difference between relative and absolute time (value vs. delta)
  • Rewrite a test that was checking for relative time to actually check for absolute time. This was either a bug in the test or is currently a bug in our code. @erwinmombay, can you help me figure out the intention of the test named: "should add default optional relative start time on the"

@erwinmombay
Copy link
Member

from what i recall it should be time relative to epoch, ill try and figure out the original intention of that test (its been a while)

Copy link
Contributor

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

Excellent test updates.

@samouri samouri merged commit 49ce3f3 into ampproject:master Jan 31, 2020
@samouri
Copy link
Member Author

samouri commented Jan 31, 2020

Thanks all for the quick reviews :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants