Stub

  • Contains specific rules like:
    • if parameters are x1, x2 then result is y
      • (2, 3) => [5]
      • () => { params: [] }
  • An example of stub in JestJS is:
    • jest.fn()