[lib] Add some unit tests for invertObjectToMap<K, V>(obj: { [K]: V })
Summary:
Generated some basic unit tests for invertObjectToMap via GitHub Copilot.
One of the generated tests failed and surfaced possiblity that object entries could be "lost" if there were duplicate values... which is very often a possiblity. Added invariant to ensure values are unique and no entries are lost. Should be O(1) check so not worried about overhead.
Test Plan: Unit tests pass, made sure we had a test for BigInt values.
Reviewers: ashoat, ginsu, tomek, rohan
Reviewed By: ashoat
Subscribers: wyilio
Differential Revision: https://phab.comm.dev/D9677