util.human.io: Include relevant arguments in test messages

This way the relevant arguments are shown in case a test case fails
This commit is contained in:
Kim Alvefur 2023-07-16 19:17:06 +02:00
parent e0a423dd29
commit 9f96301ce8

View file

@ -45,7 +45,7 @@ describe("util.human.io", function ()
describe("parse_duration", function ()
local function test(expected, duration)
return assert.equal(expected, human_io.parse_duration(duration));
return assert.equal(expected, human_io.parse_duration(duration), ("%q -> %d"):format(duration, expected));
end
it("works", function ()
test(1, "1s");