fix(store): hold session texts whose set-aside fails, never overwrite them
This commit is contained in:
1 parent
1312b366b1
commit
e34b7f282e
19 files changed
+1093
-86
No files matched your search
@@ -81,7 +81,10 @@ describe('an unreadable draft', () => {
|
||||
setItem(key, value)
|
||||
})
|
||||
// Not announced as set aside: the editor stays put instead of leaving for Home.
|
||||
expect(restore()).toEqual({ kind: 'unreadable_kept' })
|
||||
expect(restore()).toEqual({
|
||||
kind: 'held',
|
||||
held: [{ text: 'draft', reason: 'unreadable', bytes: raw.length }],
|
||||
})
|
||||
expect(sessionStorage.getItem(DRAFT_KEY)).toBe(raw)
|
||||
expect(sessionStorage.getItem(QUARANTINE_KEYS.draft)).toBeNull()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user