diff --git a/src/search.js b/src/search.js index fc71c63..18921c9 100644 --- a/src/search.js +++ b/src/search.js @@ -131,3 +131,7 @@ module.exports = function search (query, skinTone, pasteByDefault = false) { return alfredItems(matches(terms)) } + +module.exports.internals = { + alfredItem +} diff --git a/test/search.test.js b/test/search.test.js index 9e8fb6a..d6ec037 100644 --- a/test/search.test.js +++ b/test/search.test.js @@ -183,6 +183,12 @@ test('finds 👨‍👩‍👦', (t) => { t.equal(found.items.filter(i => i.title === 'family man, woman, boy').length, 1) }) +test('handles emoji the system does not recognize', (t) => { + t.plan(1) + const item = search.internals.alfredItem(undefined, '🤷🏼') + t.equal(item, undefined) +}) + test('enables ctrl-modifier', (t) => { t.plan(1) const found = search('hear_no_evil')