mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
chore(tests): local formatTime locale test better assert error
This commit is contained in:
parent
a5efedcaad
commit
36f2c6e0f6
1 changed files with 3 additions and 3 deletions
|
@ -40,13 +40,13 @@ local dateCmd = process.spawn("bash", { "-c", "date +\"%A, %d %B %Y\" --date='@1
|
|||
})
|
||||
|
||||
if dateCmd.ok then
|
||||
expectedLocalizedString = dateCmd.stdout
|
||||
expectedLocalizedString = dateCmd.stdout:gsub("\n", "")
|
||||
else
|
||||
error("Failed to execute date command")
|
||||
end
|
||||
|
||||
assert(
|
||||
DateTime.fromUnixTimestamp(1693068988):formatTime("local", "%A, %d %B %Y", "fr")
|
||||
== expectedLocalizedString:gsub("\n", ""),
|
||||
"expected format specifier '%A, %d %B %Y' to return 'samedi, 26 août 2023' for locale 'fr' (local)"
|
||||
== expectedLocalizedString,
|
||||
`expected format specifier '%A, %d %B %Y' to return '{expectedLocalizedString}' for locale 'fr' (local)`
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue