Skip to content

Commit

Permalink
use opts value directly
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGruber committed Sep 27, 2024
1 parent 9a2c33f commit b898596
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions lua/pomodoro/tests/pomodoro_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,30 @@ describe("useless tests", function()
opts.breaks_before_long = 4
opts.start_at_launch = false
pomodoro.setup(opts)
-- TODO: use the opts value directly
assert(pomodoro.work_duration == 10 * MIN_IN_MS, "Opt work_duration")
assert(pomodoro.break_duration == 10 * MIN_IN_MS, "Opt break_duration")
assert(pomodoro.breaks_before_long == 4, "Opt breaks_before_long")
assert(
pomodoro.long_break_duration == 15 * MIN_IN_MS,
pomodoro.work_duration == opts.work_duration * MIN_IN_MS,
"Opt work_duration"
)
assert(
pomodoro.break_duration == opts.break_duration * MIN_IN_MS,
"Opt break_duration"
)
assert(
pomodoro.breaks_before_long == opts.breaks_before_long,
"Opt breaks_before_long"
)
assert(
pomodoro.long_break_duration == opts.long_break_duration * MIN_IN_MS,
"Opt long_break_duration"
)
assert(pomodoro.delay_duration == 10 * MIN_IN_MS, "Opt delay_duration")
assert(pomodoro.start_at_launch == false, "Opt start_at_launch")
assert(
pomodoro.delay_duration == opts.delay_duration * MIN_IN_MS,
"Opt delay_duration"
)
assert(
pomodoro.start_at_launch == opts.start_at_launch,
"Opt start_at_launch"
)
end)
--TODO: tests
end)

0 comments on commit b898596

Please sign in to comment.