Test - Mock

About

Mocking is just replacing a function by another function at runtime called a mocking function.

This function overrule the actual implementation of a function during a test.

It permits then to:

  • control the passed parameters
  • return a known value or behavior.

Mock function are generally used to simulate a integration test with third party services such as:

  • a database
  • a rest API
  • a remote server

Framework


Powered by ComboStrap