chore(tests): fix failing test by accounting for minor inaccuracy

This commit is contained in:
Erica Marigold 2023-09-11 22:52:09 +05:30 committed by GitHub
parent 207af8e3dc
commit e68d5eb207
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
local DateTime = require("@lune/DateTime") local DateTime = require("@lune/DateTime")
assert( assert(
DateTime.fromUniversalTime()["unixTimestamp"] == os.time(), math.abs(DateTime.fromUniversalTime()["unixTimestamp"] - os.time()) <= 3,
"expected DateTime.fromLocalTime() with no args to return DateTime at the current moment" "expected DateTime.fromLocalTime() with no args to return DateTime at the current moment"
) )