How function spies work in JavaScript


If you write unit tests, then you likely use a testing framework and might have come across spies. If you don't write unit tests, please take a quick pause and promise yourself to always write tests. Testing framework suggestions? Try Sinon or Jasmine. Spies allow you to monitor a function; they expose options to track invocation counts, … Continue reading How function spies work in JavaScript