fix: "save X min ago" only min to min/hours/days
This commit is contained in:
1 parent
c40522a09f
commit
65ced64568
3 files changed
+26
-8
No files matched your search
@@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user