summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/js/ttimes.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/js/ttimes.nim b/tests/js/ttimes.nim
new file mode 100644
index 000000000..a39ebe0b3
--- /dev/null
+++ b/tests/js/ttimes.nim
@@ -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