Tests: Times: JS: Add test for yearday attribute.
This commit is contained in:
parent
bef86f55ce
commit
1a5e880f5a
1 changed files with 13 additions and 0 deletions
13
tests/js/ttimes.nim
Normal file
13
tests/js/ttimes.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# test times module with js
|
||||||
|
discard """
|
||||||
|
action: run
|
||||||
|
"""
|
||||||
|
|
||||||
|
import times
|
||||||
|
|
||||||
|
# $ date --date='@2147483647'
|
||||||
|
# Tue 19 Jan 03:14:07 GMT 2038
|
||||||
|
|
||||||
|
block yeardayTest:
|
||||||
|
# check if yearday attribute is properly set on TimeInfo creation
|
||||||
|
doAssert fromSeconds(2147483647).getGMTime().yearday == 0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue