chore: port librarySearch tests from std (#3530)

Needed List.partitionMap for test to complete, so ported it too.
3 files changed