# Why I avoid test stubs in TypeScript > stub _/stʌb/_ (verb) > 1. To replace a function on an object or class with a test-only implementation. See [sinon.js](https://sinonjs.org/) for a well-written example. > 2. To leave an impediment to future engineers that they are likely to "stub" themselves on. Related topics: footgun, anti-pattern, spies, testing. > > The etymology of "stub" is disputed, but a common theory is that it was from "stubbing one's toe," and that the reaction of many engin...