youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

Improve test reliability on platforms with clock skew #430

Closed nicksay closed 7 years ago

nicksay commented 7 years ago

On platforms with significant clock skew between performance.now() and (new Date()).getTime(), tests that do not use spf.now() are unreliable. Fix this by using spf.now() in tests.

Also, standardize on (new Date()).getTime() instead of (+new Date()), which was only being used in tests.

rviscomi commented 7 years ago

LGTM