Sinon.js
Sinon.js Spies, Stubs & Sandboxes Explained
Sinon.js predates Jest's built-in mocking by years, and it still shows up in large codebases — particularly those using Mocha, Jasmine, or any test runner without first-class mock support. Understanding Sinon is also useful as a conceptual foundation: the spy/stub/mock distinction it makes explicit