1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-19 19:55:30 +08:00

Make Date.now test less flaky

This fixes #44
This commit is contained in:
Robert Krimen 2014-01-19 09:24:46 -08:00
parent 805a4c27b1
commit 7cd78b3a28

View File

@ -138,7 +138,7 @@ func TestDate_now(t *testing.T) {
test := runTest()
time := Time.Now()
test(`(""+Date.now()).substr(0, 10)`, strconv.FormatInt(epochToInteger(timeToEpoch(time)), 10)[:10])
test(`Date.now() === Date.now(1,2,3)`, "true")
test(`Date.now() - Date.now(1,2,3) < 24 * 60 * 60`, "true")
}
func TestDate_toISOString(t *testing.T) {