fix: "save X min ago" only min to min/hours/days

This commit is contained in:
fsylvain committed 2026-09-29 22:56:05 +02:00
1 parent c40522a09f
commit 65ced64568
3 files changed
+26 -8

No files matched your search

+2 -2
View File
@@ -302,7 +302,7 @@ describe('A successful save returns to the Saved state with the new time', () =>
})
describe('SaveStatus switches to a relative time after an hour', () => {
it('reads "Saved n min ago" once more than an hour has passed', async () => {
it('reads "Saved n h ago" once more than an hour has passed', async () => {
const wrapper = await mountEditor({
'GET /v1/article/12': () => mockResponse(200, articleFixture()),
})
@@ -313,7 +313,7 @@ describe('SaveStatus switches to a relative time after an hour', () => {
await vi.advanceTimersByTimeAsync(20000)
await flushPromises()
expect(wrapper.text()).toContain('Saved 90 min ago')
expect(wrapper.text()).toContain('Saved 1 h ago')
})
})