Skip to main content

Command Palette

Search for a command to run...

External Dependency, call to

Published
•1 min read•View as Markdown
External Dependency, call to

Call to an external dependency is, as it's name explains, an interaction in which a unit of code sends information to an external dependency such as:

  • Database
  • HTTP API
  • RPC
function additionWithLogging(
  summand: number,
  otherSummand: number,
  logger: ILogger
): number {
  /** Exit point => external dependency call */
  logger.log(`Will add: ${currentValue} + ${summand}`);

  return otherSummand + summand;
}

To verify it a test double is used, in this case a mock.

🇨🇴 Versión en Español