Delete selected clipboard history entries
This commit is contained in:
@@ -47,6 +47,17 @@ assertDeepEqual(
|
||||
'clipboard addEntry moves duplicate text to front'
|
||||
)
|
||||
|
||||
assertDeepEqual(
|
||||
clipboard.removeEntryAt(history, 1),
|
||||
[
|
||||
{ type: 'text', text: 'old' },
|
||||
{ type: 'image', path: '/tmp/a.png', mime: 'image/png' }
|
||||
],
|
||||
'clipboard removeEntryAt removes the requested entry'
|
||||
)
|
||||
|
||||
assertDeepEqual(clipboard.removeEntryAt(history, 10), history, 'clipboard removeEntryAt ignores invalid indexes')
|
||||
|
||||
assertDeepEqual(
|
||||
clipboard.displayRows(history, 'image', 50).map(row => ({ type: row.entryType, preview: row.previewText, mime: row.mime })),
|
||||
[{ type: 'image', preview: 'Image', mime: 'image/png' }],
|
||||
|
||||
Reference in New Issue
Block a user