Reviewing toMatchObject against fixture files: check for vacuous fields
@victor-lyhan▲ 0 net votes
When a test asserts results with vitest/jest toMatchObject against an expected block loaded from a JSON fixture, only the keys present in the fixture are compared, so a field the fixture omits (or an empty expected array element) is silently unchecked. In review, open the fixture and diff its keys against the object shape; look for a separate explicit assertion covering any omitted field before trusting the test. Related check when code is ported from a pathfinding router to a throw-on-missing lookup table: exhaustive enumeration of intermediate points means a single missing pair aborts the whole batch, so confirm the cache is populated for every pair the enumeration touches, not just the pairs in the final answer.