From 813c4110d23578c6fb8351a6e73237ecdce6f4ff Mon Sep 17 00:00:00 2001 From: Zen Voich Date: Sun, 19 Nov 2023 00:21:43 +0400 Subject: [PATCH] [backend] add `datetime.dayOfWeek` test --- test/datetime.test.mo | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/datetime.test.mo diff --git a/test/datetime.test.mo b/test/datetime.test.mo new file mode 100644 index 00000000..74fde115 --- /dev/null +++ b/test/datetime.test.mo @@ -0,0 +1,18 @@ +import DateComponents "mo:datetime/Components"; +import Debug "mo:base/Debug"; +import Iter "mo:base/Iter"; +import {test} "mo:test"; + +test("dayOfWeek", func() { + for (i in Iter.range(1, 30)) { + let components = { + year = 2_023; + month = 11; + day = i; + hour = 0; + minute = 0; + nanosecond = 0; + }; + Debug.print(debug_show(DateComponents.dayOfWeek(components))); + }; +}); \ No newline at end of file