summaryrefslogtreecommitdiff
path: root/spec/dates_spec.lua
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-02-07 22:21:19 +0100
committerAki <please@ignore.pl>2024-02-07 22:48:20 +0100
commit85f53fed3026366c3970e26e2843be3d8e702c20 (patch)
treef3f656c1557f9ffd4855feb90aafe5f6676e4eee /spec/dates_spec.lua
parent16c1d512c91cd91d0f3a81cc451a7add636370e0 (diff)
downloadactivity-85f53fed3026366c3970e26e2843be3d8e702c20.zip
activity-85f53fed3026366c3970e26e2843be3d8e702c20.tar.gz
activity-85f53fed3026366c3970e26e2843be3d8e702c20.tar.bz2
Added plain format
It is intended mostly for testing purposes
Diffstat (limited to 'spec/dates_spec.lua')
-rw-r--r--spec/dates_spec.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/dates_spec.lua b/spec/dates_spec.lua
index 1c5382e..b1d3594 100644
--- a/spec/dates_spec.lua
+++ b/spec/dates_spec.lua
@@ -1,5 +1,6 @@
local dates = require "activity.dates"
+
describe("Days in a year", function()
it("should support regular years", function()
assert.are.equal(365, dates.days_in(1970))
@@ -20,6 +21,7 @@ describe("Days in a year", function()
end)
end)
+
describe("This year is", function()
local this_year = tonumber(os.date"%Y") -- Quite useless test
@@ -28,6 +30,7 @@ describe("This year is", function()
end)
end)
+
describe("First week day of", function()
it("2023 is Sunday", function()
assert.are.equal(1, dates.first_week_day(2023))