Skip to content

Files

Latest commit

 

History

History

example

Example usage of testdouble-vitest

This is a fake API for retrieving a "report". It consists of:

  • A main getReport unit - our test subject
  • Two dependencies the subject delegates to:

Using vitest along with testdouble and testdouble-vitest to inject fake versions of our dependencies, we wrote a test suite to design how our subject delegates its work to its dependencies.