Skip to content

Commit 0167180

Browse files
authored
fix(test): relax locale-dependent assertion in format_time test (#313)
Remove hardcoded colon check that fails on non-English locales where os.date('%X') returns formats like '15时30分' instead of '15:30:00'.
1 parent dffa3f3 commit 0167180

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/unit/util_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ describe('util.format_time', function()
190190

191191
assert.is_not_nil(result)
192192
assert.is_string(result)
193-
assert.is_true(result:find(':', 1, true) ~= nil)
193+
assert.is_true(#result > 0)
194194
end)
195195

196196
it('does not convert regular second timestamps', function()

0 commit comments

Comments
 (0)