Skip to content

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

Merged
samouri merged 3 commits intoampproject:masterfrom
samouri:fix-perf-tests
Jan 31, 2020
Merged

♻️ test-performance.js: differentiate between relative and absolute time.#26568
samouri merged 3 commits intoampproject:masterfrom
samouri:fix-perf-tests

Conversation

@samouri
Copy link
Copy Markdown
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"

@samouri samouri self-assigned this Jan 30, 2020
@erwinmombay
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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