Skip to content

Commit

Permalink
add crossed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Feb 6, 2025
1 parent 8a50956 commit 89d1f56
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,28 @@ test('pads codepoint with zeroes if needed', (t) => {
const unicodes = found.items.map((item) => item.mods.ctrl.arg)
t.assert.ok(unicodes.includes('U+0035'))
})

test('"crossed" returns reasonable list', (t) => {
t.plan(1)
const found = search('crossed')
const expected = [
'😡', '🚫', 'πŸ”€', '🀞', 'βš”οΈ',
'🎌', '🫰'
]
const filtered = found.items.map(item => item.arg)
t.assert.deepStrictEqual(filtered, expected)
})

test('"crossed fingers" returns reasonable list', (t) => {
t.plan(1)
const found = search('crossed fingers')
const expected = [
'😡', '🚫', 'πŸ”€', '🀞', 'βš”οΈ',
'🎌', '🫰', '🀚', 'πŸ–οΈ', 'βœ‹',
'πŸ––', 'πŸ‘Œ', '✌️', '🀟', '🀘',
'πŸ‘ˆ', 'πŸ‘‰', 'πŸ‘†', 'πŸ–•', 'πŸ‘‡',
'☝️', '✊', 'πŸ‘', 'πŸ’…', '🀌'
]
const filtered = found.items.map(item => item.arg)
t.assert.deepStrictEqual(filtered, expected)
})

0 comments on commit 89d1f56

Please sign in to comment.