Skip to content

Commit 031541d

Browse files
Update Search/test/MetaBinarySearch.test.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b2269fc commit 031541d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Search/test/MetaBinarySearch.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ describe('Meta Binary Search', () => {
1515
)
1616
})
1717

18+
test('returns index for a matching element in a single-element array', () => {
19+
expect(metaBinarySearch([7], 7)).toBe(0)
20+
})
1821
test('returns -1 on empty input', () => {
1922
expect(metaBinarySearch([], 1)).toBe(-1)
2023
})

0 commit comments

Comments
 (0)