mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 12:49:19 +00:00
Don't use duration formatting for second unit (#23132)
Don't use duration formatting for sec unit
This commit is contained in:
@@ -21,11 +21,6 @@ const LOCALE: FrontendLocaleData = {
|
||||
|
||||
describe("formatDuration", () => {
|
||||
it("works", () => {
|
||||
assert.strictEqual(formatDuration(LOCALE, "0.5", "s"), "0s 500ms");
|
||||
assert.strictEqual(formatDuration(LOCALE, "1", "s"), "1s");
|
||||
assert.strictEqual(formatDuration(LOCALE, "1.1", "s"), "1s 100ms");
|
||||
assert.strictEqual(formatDuration(LOCALE, "65", "s"), "65s");
|
||||
|
||||
assert.strictEqual(formatDuration(LOCALE, "0.25", "min"), "0m 15s");
|
||||
assert.strictEqual(formatDuration(LOCALE, "0.5", "min"), "0m 30s");
|
||||
assert.strictEqual(formatDuration(LOCALE, "1", "min"), "1m");
|
||||
|
||||
Reference in New Issue
Block a user